__key__
stringlengths 16
21
| __url__
stringclasses 1
value | txt
stringlengths 183
1.2k
|
---|---|---|
funcom_train/42080702 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void setInternalUri(IELO elo) {
try{
URI internalUri = this.convertToInternalUri((URI)elo.getMetadata().getMetadataValueContainer(this.typeManager.getMetadataKey("uri")).getValue());
elo.getMetadata().getMetadataValueContainer(this.typeManager.getMetadataKey("uri")).setValue(internalUri);
}catch(Exception e){
throw new RooloException(e);
}
}
COM: <s> this method set the uri of the elo to the internal format </s>
|
funcom_train/41278945 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void readPayload() throws IOException {
_data_stream.skipBytes(PushCacheProtocol.COMMAND_LEN);
int rlen=_data_stream.readInt();
if(rlen==0) {
return;
}
_text_buffer=new byte[rlen];
int sofar=0;
int toread=rlen;
sofar=0;
toread=rlen;
int rv=-1;
while(toread>0) {
rv=_in.read(_text_buffer,sofar,toread);
if(rv<0) {
throw new IOException("read returned "+rv);
}
sofar+=rv;
toread-=rv;
}
_data_stream=new DataInputStream(new
ByteArrayInputStream(_text_buffer));
}
COM: <s> read remaining payload length bytes into buffer </s>
|
funcom_train/9874476 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void onMenuChanged(IDisplayMenu menu) {
//System.out.println("hello world!");
model.setMaxRatioScale(menu.getMaxRatioScale());
model.setMinRatioScale(menu.getMinRatioScale());
model.setNegColorImage(menu.getNegativeGradientImage());
model.setPosColorImage(menu.getPositiveGradientImage());
header.onMenuChanged(menu);
}
COM: <s> invoked by the framework when display menu is changed </s>
|
funcom_train/5427335 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testParseString() {
assertEquals("a\bc", LiteralUtils.parseString("'\\a\\b\\c'"));
assertEquals("a\bc", LiteralUtils.parseString("PFX12'\\a\\b\\c'"));
assertEquals("a''\b\nc", LiteralUtils
.parseString("PFX12'''\\a''\\b\\n\\c'''"));
assertEquals("a\bc\f\r\n", LiteralUtils
.parseString("'\\a\\b\\c\\f\\r\\n'"));
assertEquals("\u0001\u00FF\u0403\u0404\u0405", LiteralUtils
.parseString("'\\U1;\\xFF\\U00403;\\U404;\\u0405'"));
}
COM: <s> test parse strings </s>
|
funcom_train/32318890 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String execute(InputService inputService, String who, String[] args, boolean isCron, boolean respondWithHtml) {
StringBuffer out = new StringBuffer();
if (args.length > 1) {
out.append(CronService.cancelJob(args[1]));
LoggingService.getInstance().serverLog(who + ": " + out.toString());
}
return out.toString();
}
COM: <s> execute the command with the given arguements </s>
|
funcom_train/27821743 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void notifyCommandWillExecute(Command command,int executeType) {
Object[] listeners=m_listenerList.getListenerList();
for (int i=listeners.length-2;i>=0;i-=2)
if (listeners[i]==CommandManagerListener.class)
((CommandManagerListener)listeners[i+1]).commandWillExecute(this,command,executeType);
}
COM: <s> called on the main thread to notify listeres that command execution will start </s>
|
funcom_train/29918003 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public DisplayTokenSelector getDisplayTokenSelector() {
if(displayTokenSelector == null){
try{
Class<?> c = InterfaceFactory.class.getClassLoader().loadClass((String) settings.get(DISPLAYTOKENSELECTOR));
Object o = c.newInstance();
return (DisplayTokenSelector) o;
} catch (Exception e) {
LocalLog.getLogger().log(Level.SEVERE,"Error creating Display Token Selector " +e.getMessage());
}
}
return displayTokenSelector;
}
COM: <s> method returning the display token selector implementation from </s>
|
funcom_train/25494219 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setForegroundColor(Color foregroundColor) {
if (!isEditable() || this.foregroundColor.equals(foregroundColor)) {
return;
}
Color old = this.foregroundColor;
this.foregroundColor = foregroundColor;
fireModelChangeEvent(new ModelEvent(this, ModelEventDescriptor.MODEL_PRIMITIVE_CHANGED, foregroundColor, old));
}
COM: <s> set new foreground color </s>
|
funcom_train/36982049 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int compareTo(Object o) {
// TODO: Method signature should be compareTo(Rule o)
Rule other = (Rule) o;
if (precedence > other.getPrecedence()) {
return 1;
}
if (precedence < other.getPrecedence()) {
return -1;
}
if (this.equals(other)) {
return 0;
}
// If the classes do not equal, we can't return 0. Otherwise
// classe's nautural ordering is not consistent with equals.
return -1;
}
COM: <s> the precedence determines the order of rules </s>
|
funcom_train/18583753 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Object deleteObjects(Object obj,Integer userId){
this.userId = userId;
this.persistenObject = obj;
System.out.println("Deleting: " + obj + " pkId: " + ((org.opentapas.commons.rim.Any)obj).getPkId());
return this.execute();
}
COM: <s> deletes the supplied object from the persistent store </s>
|
funcom_train/37016225 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String getLocation(Resource base) {
String l_location = "";
if (base == null) {
return l_location;
}
try {
Resource r = (Resource) base.getProperty(LOMTECH.location).getObject();
l_location = r.getURI();
} catch (RDFException e) {
e.printStackTrace();
}
return l_location;
}
COM: <s> gets the location </s>
|
funcom_train/45692202 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addMidiClockPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_GlobalParameters_midiClock_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_GlobalParameters_midiClock_feature", "_UI_GlobalParameters_type"),
EsxPackage.Literals.GLOBAL_PARAMETERS__MIDI_CLOCK,
true,
false,
false,
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the midi clock feature </s>
|
funcom_train/42535303 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean equals(Object o){
if(!(o instanceof NFA))return false;
if(o == this)return true;
NFA oo = (NFA)o;
return (((Object)start).equals(oo.start))&&(((Object)fin).equals(oo.fin))&&(((Object)trans).equals(oo.trans));
}
COM: <s> is the given object equal to this nfa </s>
|
funcom_train/12836681 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void sendMessage(final Message aMessage) {
try{
(new Thread() {
public void run() {
try {
/* Deal with the message : Either "broadcast" it or send
* it to a single receipient
*/
if(aMessage.getReceiverAddress().equals(Message.BROADCAST))
broadcast(aMessage);
else
deliver(aMessage);
}
catch (Exception ex) {
ex.printStackTrace();
}
}
}).start();
}
catch (Exception ex) {
Logger.getInstance().error("Error Sending Message " + ex.toString());
}
}
COM: <s> send the given message </s>
|
funcom_train/9998917 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int getClassFrequency(int classValue) {
// If classes are supported and the class value is valid, return actual
// value
if (classCount != null)
if ((classValue >= 0) && (classValue < classCount.length))
return classCount[classValue];
else
return 0;
// Otherwise return zero
else
return 0;
}
COM: <s> return the class frequency of this word for a given class </s>
|
funcom_train/4563 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void Sensing(ParsingEvent pe){
if(m_teamName.equals("")){
CaseEvent ce = new CaseEvent(this);
for(CaseEventListener cel:CEListeners) cel.TeamNameMissing(ce);
}
else{
if(m_lastInputs.getNumberSensoryItems()>0){
CaseEvent ce = new CaseEvent(this,m_actionList);
for(CaseEventListener cel:CEListeners) cel.GotActions(ce);
}
m_lastInputs = new AgentInputs();
m_actionList = new ArrayList<AgentAction>();
}
}
COM: <s> parsing event that occurs when the agent start receiving sensor </s>
|
funcom_train/20644019 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public ArrayList getAcceptedTarifTypes() {
try {
ArrayList v = (ArrayList) getProperty(BCNode.PROP_ACCEPTED_TARIFS_TYPE);
if (v == null) { // not localy handeled
if (isRoot()) { // fill with all known Tarifs
v = TarifManager.getTarifTypes();
setProperty(BCNode.PROP_ACCEPTED_TARIFS_TYPE,v);
} else {
return getParent().getAcceptedTarifTypes();
}
}
return v;
} catch (Exception e) {
m_log.error( "BCNode: getAcceptedTarifTypes[]", e );
}
return null;
}
COM: <s> get the tarifs type lists accepted by this node </s>
|
funcom_train/28227277 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testCustomConfigValues() throws Exception {
//MDAContext context = readConfig();
assertTrue(compareValues(context.get("tablePrefix" ), TABLE_PREFIX_VALUE ));
assertTrue(compareValues(context.get("columnPrefix"), COLUMN_PREFIX_VALUE));
}
COM: <s> ensures custom configuration options match the input files </s>
|
funcom_train/33859956 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JTextField getNegationsReductionTextField() {
if (negationsReductionTextField == null) {
negationsReductionTextField = new JTextField();
negationsReductionTextField.setBackground(new Color(255, 255, 102));
negationsReductionTextField.setHorizontalAlignment(JTextField.LEFT);
negationsReductionTextField.setFont(new Font("Serif", Font.BOLD, 14));
negationsReductionTextField.setEditable(true);
}
return negationsReductionTextField;
}
COM: <s> this method initializes negations reduction text field </s>
|
funcom_train/5810597 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private File createTempCopy(FileAnticipator fa, File sourceDir, File destDir, String file) throws Exception {
FileUtils.copyFile(new File(sourceDir, file), new File(destDir, file));
return fa.expecting(destDir, file);
}
COM: <s> copys source dir relative file path to dest dir relative file path </s>
|
funcom_train/43618662 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private SortOrder getNextInCycle(SortOrder current) {
int pos = sortCycle.indexOf(current);
if (pos < 0) {
// not in cycle ... what to do?
return getFirstInCycle();
}
pos++;
if (pos >= sortCycle.size()) {
pos = 0;
}
return sortCycle.get(pos);
}
COM: <s> returns the next sort order relative to the current or null </s>
|
funcom_train/9339798 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String readPlainLine(final BufferedReader bufferedReader) throws FileNotFoundException, IOException, UnexpectedEndException {
String readLine = "";
do {
final String temp = bufferedReader.readLine();
if (temp != null) {
readLine = temp.trim().toLowerCase(utils.getLocale());
line++;
} else {
throw new UnexpectedEndException(readLine, line);
}
} while (readLine.isEmpty() || readLine.startsWith(Syntax.COMMENT_LINE));
return readLine;
}
COM: <s> reads a single line of the configuration file </s>
|
funcom_train/46098479 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JButton getCancelarButton() {
if (cancelarButton == null) {
cancelarButton = new JButton();
cancelarButton.setBounds(new Rectangle(400, 499, 106, 26));
cancelarButton.setText("CANCELAR");
cancelarButton.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent e) {
System.out.println("cancelar"); // TODO Auto-generated Event stub actionPerformed()
dispose();
}
});
}
return cancelarButton;
}
COM: <s> this method initializes cancelar button </s>
|
funcom_train/13259714 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected ImageIcon mirrorImage(ImageIcon base) {
BufferedImage out = new BufferedImage(base.getIconWidth(), base.getIconHeight(), BufferedImage.TYPE_INT_ARGB);
Graphics2D g = out.createGraphics();
g.drawImage(base.getImage(), base.getIconWidth(), 0, 0, base.getIconHeight(), 0, 0, base.getIconWidth(), base.getIconHeight(), null);
return new ImageIcon(out);
}
COM: <s> rotates image on y axis </s>
|
funcom_train/2886862 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void addRowId(long rowId) {
byte[] rowid = Integer.toString((int) rowId).getBytes();
int padSpace = 10 - rowid.length;
if (padSpace > 0) {
value.append(spaces, 0, 10 - rowid.length);
}
value.append(rowid, 0, Math.min(rowid.length, 10));
}
COM: <s> add the rowid to the row </s>
|
funcom_train/37836832 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private DropTarget getCurrentDropTarget() {
if (underlyingComponent == null) {
Container parent = getParent();
Point containerPoint = SwingUtilities.convertPoint(this, point, parent);
underlyingComponent = SwingUtilities.getDeepestComponentAt(parent, containerPoint.x, containerPoint.y);
}
if ((underlyingComponent instanceof DropTarget)
&& (((DropTarget) underlyingComponent).canAccept(dragged.getEntity()))) {
return (DropTarget) underlyingComponent;
}
return null;
}
COM: <s> get the drop target capable of accepting the dragged entity at the </s>
|
funcom_train/46621452 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Button getReloadButton() {
if (iReloadButton == null) {
try {
iReloadButton = new Button();
iReloadButton.setName("ReloadButton");
iReloadButton.setLabel("(Re)Load");
} catch (Throwable iExc) {
handleException(iExc);
}
}
return iReloadButton;
}
COM: <s> return the reload button property value </s>
|
funcom_train/11677773 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setRecoverOn(long recoverOn) {
if (this.isClusteringEnable) { // if this is a clustering env.
// replicates the state so that all instances across cluster can see this state
setAndReplicateState(this.recoverOnPropertyKey, recoverOn);
} else {
this.recoverOn = recoverOn;
}
}
COM: <s> sets time to recover a failed endpoint </s>
|
funcom_train/50908646 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean handleEnPassant(Square origin, Square destination) {
boolean enPassantOccurred = false;
if (origin.getPiece() instanceof Pawn && destination.getPiece() instanceof Passing) {
Passing passingPiece = (Passing)destination.getPiece();
Square linkedSquare = passingPiece.getLinkedSquare();
linkedSquare.setPiece(null);
enPassantOccurred = true;
}
return enPassantOccurred;
}
COM: <s> handles the special case of en passant </s>
|
funcom_train/2939605 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addEventTypes(EventType[] eventTypes) {
EventType[] newElements = new EventType[elements.length + eventTypes.length];
System.arraycopy(elements, 0, newElements, 0, elements.length);
for (int i = 0; i < eventTypes.length; i++) {
newElements[elements.length + i] = eventTypes[i];
}
elements = newElements;
}
COM: <s> adds event types to this event type group </s>
|
funcom_train/44977850 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void treeInitFolder(TreeItem item, FileThing folder) {
item.setText(folder.getName());
item.setImage(iconCache.stockImages[iconCache.iconClosedFolder]);
item.setData(TREEITEMDATA_FILE, folder);
item.setData(TREEITEMDATA_IMAGEEXPANDED,
iconCache.stockImages[iconCache.iconOpenFolder]);
item.setData(TREEITEMDATA_IMAGECOLLAPSED,
iconCache.stockImages[iconCache.iconClosedFolder]);
}
COM: <s> initializes a folder item </s>
|
funcom_train/1151905 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Command getItemCommand21() {
if (itemCommand21 == null) {//GEN-END:|409-getter|0|409-preInit
// write pre-init user code here
itemCommand21 = new Command("Item", Command.ITEM, 0);//GEN-LINE:|409-getter|1|409-postInit
// write post-init user code here
}//GEN-BEGIN:|409-getter|2|
return itemCommand21;
}
COM: <s> returns an initiliazed instance of item command21 component </s>
|
funcom_train/17642553 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: /*private void initConnection() {
//String url = "http://81.22.135.175:8080/gameServer";
HessianProxyFactory factory = new HessianProxyFactory();
try {
gameServer = (GameServer) factory.create(GameServer.class, url);
} catch (MalformedURLException e) {
e.printStackTrace();
}
}*/
COM: <s> initializing connection which is using hessian </s>
|
funcom_train/31400531 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected boolean isIgnorable(Exception e) {
if (e instanceof DuplicatePathWarning)
return true;
if (e instanceof UnresolvedReferenceException) {
ProgramElement unresolvedReference = ((UnresolvedReferenceException) e).getUnresolvedReference();
if (isReferingUnavailableCode(unresolvedReference)) {
return true;
}
if (isTemplateCode(unresolvedReference)) {
return true;
}
}
return false;
}
COM: <s> redefine this method to filter exceptions that are not considered as an </s>
|
funcom_train/17255776 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setData(Vector3f center, int zSamples, int radialSamples, float radius) {
if (center != null)
this.center = center;
else
this.center = new Vector3f(0, 0, 0);
this.zSamples = zSamples;
this.radialSamples = radialSamples;
this.radius = radius;
setGeometryData();
setIndexData();
setDefaultColor(ColorRGBA.white);
}
COM: <s> changes the information of the sphere into the given values </s>
|
funcom_train/8284379 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String outputString(WireFeed feed) throws IllegalArgumentException,FeedException {
Document doc = outputJDom(feed);
String encoding = feed.getEncoding();
Format format = Format.getPrettyFormat();
if (encoding!=null) {
format.setEncoding(encoding);
}
XMLOutputter outputter = new XMLOutputter(format);
return outputter.outputString(doc);
}
COM: <s> creates a string with the xml representation for the given wire feed </s>
|
funcom_train/38512984 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String createDefaultVar(Feature pFeature) {
if (pFeature == null) return null;
Feature pParent = (Feature) pFeature.getParent();
if (pParent == null) {
return Feature.ROOT_FEATURE_NAME;
} else {
String prefix = pParent.getSymbolicVar();
int i = pParent.getIndexOfChild(pFeature);
return prefix + "_" + i;
}
}
COM: <s> creates a default variable if default variable will be empty </s>
|
funcom_train/18320592 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected Command getCreateCommand(CreateRequest request) {
GState superstate = (GState)getHost().getModel();
GState state = (GState)request.getNewObject();
snapDropPosition(request);
Rectangle constraints = (Rectangle)getConstraintFor(request);
return commandsFactory.getCreateStateCommand(superstate, state, constraints);
}
COM: <s> returns command to create new state </s>
|
funcom_train/18732803 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public List getDeclareAnnotationOnMethods() {
if (declareAnnotationOnMethods == null) {
Set ret = new HashSet();
for (Iterator i = members.values().iterator(); i.hasNext(); ) {
ret.addAll(((CrosscuttingMembers)i.next()).getDeclareAnnotationOnMethods());
}
declareAnnotationOnMethods = new ArrayList();
declareAnnotationOnMethods.addAll(ret);
}
return declareAnnotationOnMethods;
}
COM: <s> return an amalgamation of the declare </s>
|
funcom_train/44496921 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public IHTMLInputElement setCheckbox(String checkboxFieldName, boolean checked) {
IHTMLInputElement checkbox = getCheckbox(checkboxFieldName);
if (checkbox != null) {
checkbox.setChecked(checked);
}else{
throw new RuntimeException(checkboxFieldName + " does not exist as a checkbox field in the current form!");
}
return checkbox;
}
COM: <s> sets the checkbox to checked or unchecked </s>
|
funcom_train/49350211 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JPanel getStatusPanel() {
if (statusPanel == null) {
GridLayout gridLayout = new GridLayout();
gridLayout.setRows(1);
statusPanel = new JPanel();
statusPanel.setLayout(gridLayout);
statusPanel.setBorder(BorderFactory.createEmptyBorder(4, 4, 4, 4));
statusPanel.add(statusLabel, null);
}
return statusPanel;
}
COM: <s> this method initializes status panel </s>
|
funcom_train/15867612 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getAsProlog() {
StringBuilder s = new StringBuilder("plan("+op.opName()+",[");
String v="";
for (Goal sg: getSubGoals()) {
s.append( v+sg.getAsProlog() );
v=",";
}
s.append("])");
return s.toString();
}
COM: <s> returns a string representing the plan in prolog syntax format </s>
|
funcom_train/49469086 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String getStringValueForSql(String s) throws Exception {
switch(restrictionType){ //NOPMD don't bother me with breaks, i have returns
case Filter.IS_NULL :
case Filter.IS_NOT_NULL :
return null;
case Filter.EQUALS :
case Filter.DIFFERENT :
return s;
case Filter.CONTAINS :
return "%"+s+"%";
case Filter.STARTS_WITH :
return s+"%";
case Filter.ENDS_WITH :
return "%"+s;
default:
throw new Exception("Unknown comparison type");
}
}
COM: <s> generate the sql string that will be put in the prepared statement </s>
|
funcom_train/13479643 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Image getMimeIcon(String fullMime){
String mime = fullMime.substring(fullMime.indexOf('/') + 1);
return SWTResourceManager.getImage(GuiUtils.class,
"/net/sf/yadoda/gui/img/mime/" + mime + ".png");
}
COM: <s> try to find appropriate icon </s>
|
funcom_train/49106348 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addBranchYijTest(String data) {
StringTokenizer st = new StringTokenizer(data, ",");
String fromBusId = st.nextToken();
String toBusId = st.nextToken();
double time = new Double(st.nextToken()).doubleValue();
yTestRecorder.addTestRecord(new YMatrixChangeTestRecorder.TestRecord(fromBusId, toBusId, time));
}
COM: <s> add a branch yij test record </s>
|
funcom_train/29738499 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setCustomProperty(String propertyName, Object value) {
if (propertyName == null) {
throw new NullPointerException("The propertyName for a custom property " +
"on MetaData cannot be null");
}
Object oldValue = customProps.get(propertyName);
customProps.put(propertyName, value);
firePropertyChange(propertyName, oldValue, value);
}
COM: <s> places a custom property into this meta datas custom properties map </s>
|
funcom_train/9156828 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public double getAvgLenTokenNumber(String field) throws IOException {
IndexReader reader = readers.getReader(field);
if(reader != null && reader instanceof ProbabilisticIndexReader)
{
return ((ProbabilisticIndexReader)reader).getAvgLenTokenNumber(field);
}
throw new NotImplemented("getAvgLenTokenNumber only implemented for probabilistic models");
}
COM: <s> prbobailistic reader interface </s>
|
funcom_train/4933233 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addRulesOrQueries(StringBuilder result) {
result.append("\nquery \"userData\"\n ");
final DroolsTripleHandler h = new DroolsTripleHandler(null, null);
h.makeDroolsCriterium(
"?RESOURCE",
appStatusURI,
appUserDataURI, "-1", result
);
// result.append( " triple : " );
h.makeDroolsCriterium(
"?RESOURCE",
"?PREDICATE",
"?VALUE", "-1", result
);
result.append("\nend\n");
}
COM: <s> implementation of app save n3 file </s>
|
funcom_train/44880881 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setIncludes(String includesLst) {
if (includesLst == null) {
throw new NullPointerException();
}
StringTokenizer strTok = new StringTokenizer(includesLst, INCLUDE_DELIM);
if (strTok.hasMoreTokens()) {
includes = new ArrayList();
String token;
while (strTok.hasMoreTokens()) {
token = strTok.nextToken().trim();
if (token.length() > 0) {
includes.add(token);
}
}
}
}
COM: <s> setter for an include file list separated by </s>
|
funcom_train/25877461 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void appendChunks(Identifier id) throws IOException {
while (true) {
boolean eof = readChunk();
if (eof) {
// done
complete();
return;
}
Extent extent = new Extent(currentBytes, buffer.getSize());
esu.updateObjectFromSegment(id, null, null, extent, buffer, null, checksum);
this.progress(buffer.getSize());
}
}
COM: <s> continues writing data to the object until eof </s>
|
funcom_train/1905041 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testReadXMLDocumentXMLFormat() throws PropertyNotFoundException {
debug("\nRunning: testReadXMLDocumentXMLFormat test");
String name = "john" + PropertyService.getProperty("document.accNumSeparator") + serialNumber
+ PropertyService.getProperty("document.accNumSeparator") + "1";
assertTrue(handleReadAction(name, "xml"));
}
COM: <s> test read a xml document in xml format successfully </s>
|
funcom_train/50154560 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Object getObject() {
HashSet objects = new HashSet();
for (int i = 0; i < this.getChildCount(); i ++) {
BaseTreeNode child = (BaseTreeNode)getChildAt(i);
Object childObj = child.getObject();
if (childObj != null) {
objects.add(childObj);
}
}
Object[] array = objects.toArray();
return array;
}
COM: <s> since not all code action mappings code are implemented via </s>
|
funcom_train/3176665 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getJurisdictionsAsString() {
WordBuffer result = new WordBuffer(", ");
result.append(city);
for (int i = 0; i < jurisdictions.size(); i++)
result.append(jurisdictions.get(i));
result.append(country);
return result.toString();
}
COM: <s> jurisdictions as comma separated strings </s>
|
funcom_train/25339447 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void writeAttribute(java.lang.String prefix, java.lang.String namespace, java.lang.String attName, java.lang.String attValue, javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException {
if (xmlWriter.getPrefix(namespace) == null) {
xmlWriter.writeNamespace(prefix, namespace);
xmlWriter.setPrefix(prefix, namespace);
}
xmlWriter.writeAttribute(namespace, attName, attValue);
}
COM: <s> util method to write an attribute with the ns prefix </s>
|
funcom_train/15487563 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JTextArea getJTextArea() {
if (jTextArea == null) {
jTextArea = new JTextArea();
jTextArea.setLineWrap(true);
highlightPainter = new DefaultHighlightPainter(new Color(214, 186, 255));
highlighter = new DefaultHighlighter();
jTextArea.setHighlighter(highlighter);
jTextArea.addKeyListener(new java.awt.event.KeyAdapter() {
public void keyReleased(java.awt.event.KeyEvent e) {
onTextChange();
}
});
}
return jTextArea;
}
COM: <s> this method initializes j text area </s>
|
funcom_train/13439584 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void doNewAddress(int addrPos) {
ArrayList lines = new ArrayList();
int numLines = HGBaseConfig.getInt("addresslines");
if (numLines <= 0) numLines=1;
for (int i=0; i<numLines; i++) {
JTextField tfNew = createTextField("", false, numLines);
lines.add(tfNew);
}
fieldList.add(addrPos+1, lines);
saveContent();
loadContent();
setCursorPosition(addrPos+1, 0);
}
COM: <s> adds an address </s>
|
funcom_train/44392190 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean repeatLoopHeader() {
X12Segment segment = (X12Segment) getCurrentLoop().getSegments().get(0);
X12Element element = (X12Element) segment.getX12Elements().get(1);
if (element.getValue().compareTo(trimedLineParts[1]) == 0) {
return true;
}
return false;
}
COM: <s> repeat loop header </s>
|
funcom_train/13304273 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addRequestForProposalPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_Offer_requestForProposal_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_Offer_requestForProposal_feature", "_UI_Offer_type"),
NegotiationPackage.Literals.OFFER__REQUEST_FOR_PROPOSAL,
true,
false,
true,
null,
null,
null));
}
COM: <s> this adds a property descriptor for the request for proposal feature </s>
|
funcom_train/21483632 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected WebConversation createWebConversation(boolean acceptGzip) {
HttpUnitOptions.setExceptionsThrownOnScriptError(false);
HttpUnitOptions.setCheckContentLength(true);
HttpUnitOptions.setScriptingEnabled(false);
ClientProperties.getDefaultProperties().setAcceptGzip(acceptGzip);
final WebConversation conversation = new WebConversation();
return conversation;
}
COM: <s> creates a new web conversation to use for this test </s>
|
funcom_train/21224632 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void prepareWrite(final int memoryIndex) {
if (informationPopulated) {
if (memoryIndex < firstIndex) {
throw new IllegalArgumentException("memoryIndex < firstIndex");
} else if (memoryIndex > lastIndex) {
throw new IllegalArgumentException("memoryIndex > lastIndex");
}
}
setCommand("AT+CPBW=" + memoryIndex, Command.WRITE);
}
COM: <s> this will delete the phonebook entry at the given index </s>
|
funcom_train/886147 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void convert(File inputFile, DocumentFormat inputFormat, File outputFile, DocumentFormat outputFormat, TransformerObserver observer, ResourceBundle resBundle) throws ExportException {
convert(inputFile, inputFormat, outputFile, outputFormat, observer, resBundle, new PropertyValue[0]);
}
COM: <s> convert a document </s>
|
funcom_train/12646609 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addNotify() {
synchronized (getTreeLock()) {
if (peer == null)
peer = ((PeerBasedToolkit) Toolkit.getDefaultToolkit()).createMenuBar(this);
int nmenus = getMenuCount();
for (int i = 0; i < nmenus; i++) {
getMenu(i).addNotify();
}
}
}
COM: <s> creates the menu bars peer </s>
|
funcom_train/2801933 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String convertClassNameToRepoObject(String pClassName) throws RaccoonException {
String result = convertPackageToRepoPath(pClassName);
result = result.replace('/', '_');
//System.out.println("RepoGenerator::convertClassNameToRepoObject(" + pClassName + ") = \"" + result + "\"");
return result;
}
COM: <s> converts the fully qualified name of a class into ae object name </s>
|
funcom_train/4360096 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String createGroup(String groupname, String description) {
UserDatabase database = (UserDatabase) this.resource;
Group group = database.createGroup(groupname, description);
try {
MBeanUtils.createMBean(group);
} catch (Exception e) {
IllegalArgumentException iae = new IllegalArgumentException
("Exception creating group " + group + " MBean");
iae.initCause(e);
throw iae;
}
return (findGroup(groupname));
}
COM: <s> create a new group and return the corresponding mbean name </s>
|
funcom_train/29939602 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void updateButtonGroupSelection(Button button) {
bodyButton.setSelection(bodyButton.equals(button));
interfaceButton.setSelection(interfaceButton.equals(button));
lexButton.setSelection(lexButton.equals(button));
yaccButton.setSelection(yaccButton.equals(button));
otherButton.setSelection(otherButton.equals(button));
}
COM: <s> updates the button group selection with the given button </s>
|
funcom_train/8987874 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void checkDmsAttachmentWithPublicFolderSizeByDocumentID(String attachmentFilenames,Integer documentId) throws ApplicationException{
Integer currentRecordDmsRootID = null;
if(attachmentFilenames==null||documentId==null){
return;
}
currentRecordDmsRootID = getDocumentRootIDByDocumentID(documentId);
checkDmsAttachmentWithPublicFolderSize(attachmentFilenames, currentRecordDmsRootID);
}
COM: <s> check dms attachment size with this workflow unload path of public folder size </s>
|
funcom_train/34813628 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public double pValueRightSide(double value){
//has the histogram been totaled?
if (totalBinHitsRightOfZero == -1) totalBinHitsRightOfZero = numberBinHitsToRightAndIncludingValue(0);
double totalRightSide = numberBinHitsToRightAndIncludingValue(value);
if (totalRightSide == 0) return 1.0/totalBinHitsRightOfZero;
return totalRightSide/totalBinHitsRightOfZero;
}
COM: <s> returns a one tailed right side p value given a threshold </s>
|
funcom_train/34257068 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void ensureComponentsValid() {
for (int i = getDiscussionTopicList().size() - 1; i >= 0; --i) {
DiscussionTopic lDiscussionTopic = (DiscussionTopic)getDiscussionTopicList().get(i);
if (!getFmm().getDiscussionTopicList().contains(lDiscussionTopic)) {
this.removeDiscussionTopic(lDiscussionTopic);
}
}
}
COM: <s> make sure any objects referenced as children either directly </s>
|
funcom_train/3561175 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void createDatabase(String dbAddress, int port, String dbName) throws DbException {
DbCreator creator;
creator = (DbCreator) dbms2creator.get(name);
if (creator != null)
creator.create(this, dbAddress, port, dbName);
else
throw new DbException("[DbDatabaseAdmin] Cannot find database creator");
}
COM: <s> creates a database </s>
|
funcom_train/37081708 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private int getNumberOfFeatures(){
String numberString = getNumberTextField().getText();
int number = 0;
try{
number = Integer.valueOf(numberString).intValue();
}catch(NumberFormatException exception){
throw new NonFatalDataAdapterException("Please enter a valid integer number of features");
}//end try
return number;
}//end getNumberOfFeatures
COM: <s> returns the number of features the user asked to be displayed </s>
|
funcom_train/26393081 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setRepository(File newRepository) {
assert repository != null;
newRepository.mkdirs();
repository = newRepository;
if (repository != null) {
if (!repository.isDirectory()) {
throw new IllegalArgumentException("Specified repository '"
+ newRepository.getAbsolutePath()
+ "' is not a directory");
}
}
}
COM: <s> specify the file repository used to hold content in temporary files if </s>
|
funcom_train/44398363 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String decodeCharset(ByteBuffer buffer) {
String message = null;
try {
Charset charset = Charset.forName(charsetName);
CharsetDecoder decoder = charset.newDecoder();
CharBuffer charBuffer = decoder.decode(buffer);
message = charBuffer.toString();
} catch (CharacterCodingException e) {
logger.error("Character decoding error: " + e.getMessage());
}
return message;
}
COM: <s> bytes to characters decoding with given charset </s>
|
funcom_train/18655611 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getSelectedStudent() {
String selectedStudent;
//If there is a casting problem, just return null as that's what
//GUIManager will be expecting if nothing is selected anyway
try {
selectedStudent = (String)list.getSelectedValue();
} catch (ClassCastException e) {
selectedStudent = null;
}
return selectedStudent;
}
COM: <s> retrieves the selected student returning null if there isnt one </s>
|
funcom_train/8533913 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void onFinish(List successList, List failureList) {
fAnnotationModel.setContent(fContent);
// Now the internal template builder is initialized so it can be
// used to create widgets
TemplateBuilder templateBuilder = fConfig.getTemplateBuilder();
fAnnotationPanel.setTemplateBuilder(templateBuilder);
}
COM: <s> this method is called when all asynchronous loading processes are </s>
|
funcom_train/19410998 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testUnquotingValues() {
Cn cn = new Cn("\"x,xx\"");
assertEquals("x,xx", cn.getValue());
assertEquals("CN=\"x,xx\"", cn.toString());
}
COM: <s> test unquoting of value strings </s>
|
funcom_train/26485819 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public NNTPGroupList matchGroups(String pattern) {
NNTPGroupList groups = new NNTPGroupList(m_access);
NNTPGroup group = null;
Iterator iter = this.iterator();
while(iter.hasNext()) {
group = (NNTPGroup)iter.next();
if (group != null && group.name().indexOf(pattern) >= 0)
groups.add(group);
}
return groups;
}
COM: <s> iterates through all the group names and compares them with the </s>
|
funcom_train/5586757 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Fd getFd(String fullName) throws IllegalStateException {
// Split into class and field names
int pos = fullName.lastIndexOf(METHOD_FIELD_LEVEL);
Cl cl = getCl(fullName.substring(0, pos));
if (null != cl) {
return cl.getField(fullName.substring(pos + 1));
}
return null;
}
COM: <s> get field in tree from the fully qualified name </s>
|
funcom_train/5550600 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JPanel getCtrl_panel() {
if (ctrl_panel == null) {
GridLayout gridLayout = new GridLayout();
gridLayout.setRows(1);
gridLayout.setColumns(2);
ctrl_panel = new JPanel();
ctrl_panel.setLayout(gridLayout);
ctrl_panel.add(getData_panel(), null);
ctrl_panel.add(getCmd_panel(), null);
}
return ctrl_panel;
}
COM: <s> this method initializes ctrl panel </s>
|
funcom_train/42201111 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void init() {
robotTypes.clear();
robotTypes.addAll(status.getDataStore().getTypes());
udfNames.clear();
udfNames.addAll(status.getDataStore().getUDFs());
model.reset();
matchList = new MatchList(status);
matches = new JScrollPane(matchList);
matches.setBorder(ButtonFactory.getThinBorder());
matches.setPreferredSize(new Dimension(730, 100));
}
COM: <s> initializes the team viewer </s>
|
funcom_train/45494126 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void validateVoce(Soggettario soggettario,String voce,Errors errors) {
if(voce != null && soggettario != null) {
ValidationUtils.rejectIfEmptyOrWhitespace(errors, "voce",
"error.message.fallita.campo.obbligatorio");
ValidationResult result = validatorService.controllaVoceSuSoggettario(soggettario, voce);
if (!result.isSuccess()) {
errors.rejectValue("voce",result.getMessage());
}
}
}
COM: <s> verify the uniqueness of the subject </s>
|
funcom_train/2492120 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setActionWhenEscapePressed(AbstractAction action) {
KeyStroke strokeEsc = KeyStroke.getKeyStroke(KeyEvent.VK_ESCAPE, 0);
InputMap inputMap = rootPane
.getInputMap(JComponent.WHEN_IN_FOCUSED_WINDOW);
inputMap.put(strokeEsc, "ESCAPE");
rootPane.getActionMap().put("ESCAPE", action);
}
COM: <s> set special action when escape was pressed </s>
|
funcom_train/8557695 | /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) {
FileCacheEntry e1 = (FileCacheEntry) o1;
FileCacheEntry e2 = (FileCacheEntry) o2;
if (e1.getLastAccessed() < e2.getLastAccessed()) {
return -1;
} else if (e1.getLastAccessed() == e2.getLastAccessed()) {
return 0;
}
return 1;
}
COM: <s> comparator function for sorting by last accessed during eviction </s>
|
funcom_train/35837215 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void paintDisabledText(UINode n, Graphics g, String s, int textX, int textY) {
Color background = n.getBackground();
g.setColor(background.brighter());
BasicGraphicsUtils.drawString(g, s, '\0', textX, textY);
g.setColor(background.darker());
BasicGraphicsUtils.drawString(g, s, '\0', textX + 1, textY + 1);
}
COM: <s> paint clipped text at text x text y with background </s>
|
funcom_train/34146611 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void delete() {
Iterator<Geom> i;
// JC: This is bad and should not happen. Use the cleanup mode instead!
// Need to discuss why this is here further.
// Delete geoms
i = getGeoms().iterator();
while ( i.hasNext() ) {
( i.next() ).delete();
}
// Delete space
Ode.dSpaceDestroy( spaceId );
deleted = true;
}
COM: <s> request deletion of this space </s>
|
funcom_train/14415354 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected JTextField createTextField(CIMProperty cp) {
// System.out.println(cp.toString());
CIMProperty current = cp;
JTextField jTF =
new JTextField(
((current != null)
&& (current.getValue() != null)
&& (current.getValue().getValue() != null))
? (current.getValue().getValue().toString())
: "");
jTF.setEditable(!current.isKey());
return jTF;
}
COM: <s> method create text field </s>
|
funcom_train/35848657 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testStringGenerationNoClassNameNoOperName() {
setUp2();
Model.getCoreHelper().setName(aOper, "");
CallStateNotationUml notation = new CallStateNotationUml(aCallState);
String notationStr = notation.toString(aCallState, null);
assertEquals("Notation not correctly generated", "", notationStr);
}
COM: <s> test if the string for an unnamed class and unnamed operation is correct </s>
|
funcom_train/16258706 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean isValidStackSeries() {
return stackEnabled
&& stackSeries != null
&& stackSeries.length > 0
&& !chart.getAxisSet().getYAxis(yAxisId).isLogScaleEnabled()
&& ((Axis) chart.getAxisSet().getXAxis(xAxisId))
.isValidCategoryAxis();
}
COM: <s> gets the state indicating if the series is valid stack series </s>
|
funcom_train/15713627 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void doExecute() {
basePath = pluginResourceDir.replaceAll("\\\\", "/");
basePath = basePath.replaceAll("plugin-resources/{0,1}\\z", "");
init(basePath, verbose);
startConversion(propertiesFile, inputFileName, outputFileName,
outputFormatName, localeCode);
}
COM: <s> start conversion using the current settings </s>
|
funcom_train/23157255 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void applyFont(Font font) {
IDocument doc = getDocument();
if (doc != null && doc.getLength() > 0) {
Point selection = getSelectedRange();
int topIndex = getTopIndex();
StyledText styledText = getTextWidget();
styledText.setRedraw(false);
styledText.setFont(font);
setSelectedRange(selection.x, selection.y);
setTopIndex(topIndex);
styledText.setRedraw(true);
} else {
getTextWidget().setFont(font);
}
}
COM: <s> sets the font for the given viewer sustaining selection and scroll </s>
|
funcom_train/16465337 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void settingsLoad() {
Settings settings = Settings.getInstance();
MapSource mapSource = MapSourcesManager.getInstance().getSourceByName(settings.mapviewMapSource);
if (mapSource != null)
setMapSource(mapSource);
EastNorthCoordinate c = settings.mapviewCenterCoordinate;
gridZoom = settings.mapviewGridZoom;
setDisplayPositionByLatLon(c, settings.mapviewZoom);
setSelectionByTileCoordinate(MAX_ZOOM, settings.mapviewSelectionMin, settings.mapviewSelectionMax, true);
}
COM: <s> sets the current view by the current values from </s>
|
funcom_train/8899070 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addEdge(Edge edge) {
edge.getOriginNode().getChildren().add(edge.getDestinationNode());
edge.getDestinationNode().getParents().add(edge.getOriginNode());
edgeList.add(edge);
if (edge.getDestinationNode() instanceof ITabledVariable) {
ITabledVariable v2 = (ITabledVariable) edge.getDestinationNode();
PotentialTable auxTab = v2.getPotentialTable();
auxTab.addVariable(edge.getOriginNode());
}
}
COM: <s> adds an edge into the net </s>
|
funcom_train/14214179 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getHandlerClass(String name, int type) {
Map map = getHandlerMap();
Map hMap;
if (type == 1) {
hMap = (Map) map.get("view");
} else {
hMap = (Map) map.get("event");
}
if (!hMap.containsKey(name)) {
return null;
} else {
return (String) hMap.get(name);
}
}
COM: <s> gets the class name of the named handler </s>
|
funcom_train/11112785 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getString(byte[] in, String declaredEncoding) {
setCanonicalDeclaredEncoding(declaredEncoding);
try {
setText(in);
CharsetMatch match = detect();
if (match == null) {
return null;
}
return match.getString(-1);
} catch (IOException e) {
return null;
}
}
COM: <s> autodetect the charset of an input stream and return a string </s>
|
funcom_train/14305885 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void createOptionPanes(OptionsDialog dialog) {
OptionGroup optionGroup = new OptionGroup(jEdit.getProperty("options.OpenIt.label"));
optionGroup.addOptionPane(new SourcePathOptionsPane());
optionGroup.addOptionPane(new PopupOptionsPane());
dialog.addOptionGroup(optionGroup);
}
COM: <s> description of the method </s>
|
funcom_train/9994201 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testGetTermine() throws AssertionFailedException {
System.out.println("getTermine");
Termine expResult_1 = null;
Termine result_1 = Termine.getTermine();
assertEquals(expResult_1, result_1);
fail("The test case is a prototype.");
}
COM: <s> test of test get termine method of class termine </s>
|
funcom_train/5457821 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean equals(Object obj) {
if (this.getClass().equals(obj.getClass())) {
MessageHeader other = (MessageHeader) obj;
return other.info.equals(info) &&
other.source.equals(source) &&
other.destination.equals(destination) &&
other.date.equals(date) &&
other.time.equals(time);
}
return false;
}
COM: <s> compares for the equality against other objects </s>
|
funcom_train/50076743 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void mousePressed(MouseEvent event) {
Point p = event.getPoint();
if (compTemplate.rect.contains(p)) {
System.out.println("MousePressed on BOXTEMPLATE");
dx = p.getX() - compTemplate.x;
dy = p.getY() - compTemplate.y;
current = 1;
}
else {
System.out.println("MousePressed on Template outside BoxTemplate");
current = -1;
}
}
COM: <s> called when the mouse is pressed on template pane </s>
|
funcom_train/47945282 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: // public void addShapes(Variable var) {
// List<int[]> shapes = shapeHash.get(var.getName());
// if (shapes == null) {
// shapes = new ArrayList<int[]>();
// shapeHash.put(var.getName(), shapes);
// }
// shapes.add(var.getShape());
//
// }
COM: <s> adds variables shape to map of shapes </s>
|
funcom_train/17604890 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void init(FilterConfig filterConfig) throws ServletException {
// Put the environment into the ServletContext
EnvironmentResolver resolver = GuiceContainer.getInjector().getInstance(EnvironmentResolver.class);
String env = resolver.getEnvironment();
filterConfig.getServletContext().setAttribute("environment", env);
GuiceContainer.getInjector().injectMembers(this);
}
COM: <s> this fetches the top level workflows for jcatapult using the </s>
|
funcom_train/51412904 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void startCheck() {
final Object obj = cmtTeam.getSelectedObject();
if(obj instanceof Row) {
LOGGER.info("Start aspectcheck for teamclass <"+((Row)obj).getPrimaryKey()+">.");
//clear output from previous checks
taOutput.setText("");
CommandRunner.start(new ICommand() {
public void execute() {
compiled.clear();
compile((Row)obj);
}
}, CMDialogAspectChecker.this);
}
}
COM: <s> starts the check of the actual selected teamclass </s>
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.