nus-yam/ex-repair huggingface dataset:
Program: 180048
Project: 180048
Buggy source:
public PlotPanel createPlotPanel(Mondrian mondrian,MFrame plotFrame,DataSet dataSet,JList varNames){
  int[] indices=varNames.getSelectedIndices();
  PlotPanel barChartsContainer=new PlotPanel();
  plotFrame.setLayout(new GridLayout(1,indices.length));
  int[] vars=WeightCaclulator.getWeightVariable(varNames.getSelectedIndices(),dataSet,mondrian.calcNumCategoricalVars(),mondrian.determineWeightIndex(),null,varNames);
  int[] passed=new int[vars.length - 1];
  System.arraycopy(vars,0,passed,0,vars.length - 1);
  int weight=vars[vars.length - 1];
  for (int i=0; i < passed.length; i++) {
    int[] dummy={0};
    dummy[0]=passed[i];
    Table breakdown=dataSet.breakDown(dataSet.setName,dummy,weight);
    int totHeight=(Toolkit.getDefaultToolkit().getScreenSize()).height;
    int tmpHeight=Math.min(totHeight - 20,60 + breakdown.levels[0] * 30);
    Barchart weightedBarchart=new Barchart(plotFrame,300,tmpHeight,breakdown);
    barChartsContainer.setSize(300,tmpHeight);
    barChartsContainer.add(weightedBarchart);
  }
  plotFrame.setLocation(100,100);
  return barChartsContainer;
}

Fixed version (ground truth):
@Override public PlotPanel createPlotPanel(Mondrian mondrian,MFrame plotFrame,DataSet dataSet,JList varNames){
  int[] vars=WeightCaclulator.getWeightVariable(varNames.getSelectedIndices(),dataSet,mondrian.calcNumCategoricalVars(),mondrian.determineWeightIndex(),null,varNames);
  if (vars.length > 1) {
    int[] passed=new int[vars.length - 1];
    System.arraycopy(vars,0,passed,0,vars.length - 1);
    int weight=vars[vars.length - 1];
    return super.createBarChart(mondrian,plotFrame,dataSet,passed,weight);
  }
 else {
    return super.createBarChart(mondrian,plotFrame,dataSet,vars,vars[0]);
  }
}
Program: 180049
Project: 180049
Buggy source:
public void show(){
  m=new JMenuItem(getTitle());
  parentFrame.closeAllMenuItem.setEnabled(true);
  for (int i=2; i < parentFrame.windowMenu.getItemCount(); i++)   if (((parentFrame.windowMenu.getItem(i)).getText()).substring(0,2).equals((m.getText()).substring(0,2)))   same=true;
 else   if (same) {
    parentFrame.windowMenu.insert(m,i);
    added=true;
    same=false;
  }
  if (!added) {
    parentFrame.windowMenu.add(m);
    added=true;
  }
  m.addActionListener(new ActionListener(){
    public void actionPerformed(    ActionEvent e){
      toFront();
    }
  }
);
  super.show();
}

Fixed version (ground truth):
public void show(){
  m=new JMenuItem(getTitle());
  parentFrame.closeAllMenuItem.setEnabled(true);
  for (int i=2; i < parentFrame.windowMenu.getItemCount(); i++) {
    String entryName=(parentFrame.windowMenu.getItem(i)).getText();
    if (entryName.length() < 3) {
      continue;
    }
    if (entryName.substring(0,2).equals((m.getText()).substring(0,2))) {
      same=true;
    }
 else     if (same) {
      parentFrame.windowMenu.insert(m,i);
      added=true;
      same=false;
    }
  }
  if (!added) {
    parentFrame.windowMenu.add(m);
    added=true;
  }
  m.addActionListener(new ActionListener(){
    public void actionPerformed(    ActionEvent e){
      toFront();
    }
  }
);
  super.show();
}
Program: 180050
Project: 180050
Buggy source:
public MDialog(MonFrame parentFrame,Mondrian mondrian){
  this.mondrian=mondrian;
  this.parentFrame=parentFrame;
  this.setBackground(ColorManager.backgroundColor);
  addWindowListener(this);
}

Fixed version (ground truth):
public MDialog(MonFrame parentFrame,Mondrian mondrian){
  this.mondrian=mondrian;
  this.parentFrame=parentFrame;
  this.getContentPane().setBackground(ColorManager.backgroundColor);
  addWindowListener(this);
}
Program: 180051
Project: 180051
Buggy source:
public void loadDataSet(File file,String dsName){
  ProgIndicatorImpl progIndicator=new ProgIndicatorImpl();
  DataSet dataSet=new AsciiFileLoader(progIndicator,getMonFrame()).loadAsciiFile(file);
  progIndicator.dispose();
  if (dataSet != null) {
    if (dsName != null) {
      dataSet.setName=dsName;
    }
    Mondrian mondrian=new Mondrian(dataSet,this);
    addAndActiviate(mondrian);
  }
}

Fixed version (ground truth):
public void loadDataSet(File file,String dsName){
  ProgIndicatorImpl progIndicator=new ProgIndicatorImpl();
  DataSet dataSet=new AsciiFileLoader(progIndicator,getMonFrame()).loadAsciiFile(file);
  progIndicator.dispose();
  if (dataSet != null) {
    if (dsName != null) {
      dataSet.setName=dsName;
    }
    Mondrian mondrian=new Mondrian(dataSet,this);
    addAndActiviate(mondrian);
    mondrian.getDialog().setVisible(true);
  }
}
Program: 180052
Project: 180052
Buggy source:
public void addAndActiviate(Mondrian mondrian){
  mondrians.add(mondrian);
  monFrame.maintainOptionMenu();
}

Fixed version (ground truth):
public void addAndActiviate(Mondrian mondrian){
  mondrians.add(mondrian);
  setCurrent(mondrian);
  monFrame.maintainOptionMenu();
}
Program: 180053
Project: 180053
Buggy source:
public Mondrian getCurrent(){
  return null;
}

Fixed version (ground truth):
public Mondrian getCurrent(){
  return current;
}
Program: 180054
Project: 180054
Buggy source:
public void closeAll(){
  String message="String_Node_Str";
  int answer=JOptionPane.showConfirmDialog(monFrame,message);
  if (answer == JOptionPane.YES_OPTION) {
    closeAll();
  }
}

Fixed version (ground truth):
public void closeAll(){
  if (countInstances() > 0) {
    String message="String_Node_Str";
    int answer=JOptionPane.showConfirmDialog(monFrame,message);
    if (answer == JOptionPane.YES_OPTION) {
      System.exit(0);
    }
  }
 else {
    System.exit(0);
  }
}
Program: 180055
Project: 180055
Buggy source:
public void showModeNavigator(){
  if (modelNavigator == null)   modelNavigator=new ModelNavigator();
 else   modelNavigator.show();
}

Fixed version (ground truth):
public void showModeNavigator(){
  if (modelNavigator == null) {
    modelNavigator=new ModelNavigator();
  }
 else {
    modelNavigator.show();
  }
}
Program: 180057
Project: 180057
Buggy source:
public void maintainOptionMenu(){
  DataSet data=controller.getCurrentDataSet();
  closeDataSetMenuItem.setEnabled(true);
  saveMenuItem.setEnabled(true);
  if (data.countSelection() == 0)   selectionMenuItem.setEnabled(false);
 else   selectionMenuItem.setEnabled(true);
  if (data.colorBrush)   colorsMenuItem.setEnabled(true);
 else   colorsMenuItem.setEnabled(false);
  boolean mode=DragBox.extSelMode;
  orSelectionCheckMenuItem.setSelected(mode);
  andSelectionCheckMenuItem.setSelected(!mode);
}

Fixed version (ground truth):
public void maintainOptionMenu(){
  DataSet data=controller.getCurrentDataSet();
  closeDataSetMenuItem.setEnabled(true);
  saveAction.setEnabled(true);
  if (data.countSelection() == 0)   selectionMenuItem.setEnabled(false);
 else   selectionMenuItem.setEnabled(true);
  if (data.colorBrush)   colorsMenuItem.setEnabled(true);
 else   colorsMenuItem.setEnabled(false);
  boolean mode=DragBox.extSelMode;
  orSelectionCheckMenuItem.setSelected(mode);
  andSelectionCheckMenuItem.setSelected(!mode);
}
Program: 180058
Project: 180058
Buggy source:
public Mondrian(DataSet dataSet,MonController controller){
  this.dataSet=dataSet;
  this.controller=controller;
  dialog=new MondrianDialog(controller.getMonFrame(),this);
  dialog.setSize(300,400);
  dialog.setVisible(true);
}

Fixed version (ground truth):
public Mondrian(DataSet dataSet,MonController controller){
  this.dataSet=dataSet;
  this.controller=controller;
  dialog=new MondrianDialog(controller.getMonFrame(),this);
}
Program: 180060
Project: 180060
Buggy source:
public MondrianDialog(MonFrame parentFrame,Mondrian mondrian){
  super(parentFrame,mondrian);
  this.mondrian=mondrian;
  JPanel content=new JPanel(new BorderLayout());
  getContentPane().add(content);
  varSelector=new VariableSelector(mondrian.getDataSet());
  content.add(varSelector,BorderLayout.CENTER);
  JPanel progPanel=new JPanel();
  progPanel.add("String_Node_Str",progText);
  progBar=new JProgressBar();
  progBar.setMinimum(0);
  progBar.setMaximum(1);
  progBar.setValue(0);
  progBar.addChangeListener(new ChangeListener(){
    public void stateChanged(    ChangeEvent e){
      paintAll(MondrianDialog.this.getGraphics());
    }
  }
);
  progPanel.add(progBar,BorderLayout.CENTER);
  progText=new JLabel();
  progPanel.add(progText,BorderLayout.WEST);
  content.add(progPanel,BorderLayout.CENTER);
  updateSelectionInfo();
}

Fixed version (ground truth):
public MondrianDialog(MonFrame parentFrame,Mondrian mondrian){
  super(parentFrame,mondrian);
  this.mondrian=mondrian;
  JPanel content=new JPanel(new BorderLayout());
  getContentPane().add(content);
  varSelector=new VariableSelector(mondrian.getDataSet());
  content.add(varSelector,BorderLayout.CENTER);
  JPanel progPanel=new JPanel();
  progBar=new JProgressBar();
  progBar.setMinimum(0);
  progBar.setMaximum(1);
  progBar.setValue(0);
  progBar.addChangeListener(new ChangeListener(){
    public void stateChanged(    ChangeEvent e){
      paintAll(MondrianDialog.this.getGraphics());
    }
  }
);
  progPanel.add(progBar,BorderLayout.EAST);
  progText=new JLabel();
  progPanel.add(progText,BorderLayout.WEST);
  content.add(progPanel,BorderLayout.CENTER);
  setTitle(mondrian.getDataSet().setName);
  setSize(300,400);
  updateSelectionInfo();
}
Program: 180061
Project: 180061
Buggy source:
public MondrianStarter(String dataFileName){
  MonFrame monFrame=new MonFrame();
  monFrame.registerPlotFactory(new MissPlotFactory());
  monFrame.plotMenu.add(new JSeparator());
  monFrame.registerPlotFactory(new BarchartFactory());
  monFrame.registerPlotFactory(new WeightedBarCharFactory());
  monFrame.plotMenu.add(new JSeparator());
  monFrame.registerPlotFactory(new HistogramFactory());
  monFrame.registerPlotFactory(new WeightedHistogramFactory());
  monFrame.plotMenu.add(new JSeparator());
  monFrame.registerPlotFactory(new ScatterplotFactory());
  monFrame.registerPlotFactory(new SplomFactory());
  monFrame.plotMenu.add(new JSeparator());
  monFrame.registerPlotFactory(new MosaicPlotFactory());
  monFrame.registerPlotFactory(new WeightedMosaicPlotFactory());
  monFrame.plotMenu.add(new JSeparator());
  monFrame.registerPlotFactory(new BoxplotByXYFactory());
  monFrame.registerPlotFactory(new ParallelBoxplotFactory());
  monFrame.registerPlotFactory(new ParallelPlotFactory());
  monFrame.plotMenu.add(new JSeparator());
  monFrame.registerPlotFactory(new TwoDimMDSFactory());
  monFrame.registerPlotFactory(new MapPlotFactory());
  monFrame.registerPlotFactory(new PCAPlotFactory());
  MRJApplicationUtils.registerOpenDocumentHandler(this);
  if (dataFileName != null) {
    File dataFile=new File(dataFileName);
    if (dataFile.canRead()) {
      if (dataFile.getName().endsWith("String_Node_Str")) {
        new DataFrameConverter(monFrame).loadDataFrame(dataFile);
      }
 else {
        monFrame.getController().loadDataSet(dataFile,"String_Node_Str");
      }
    }
  }
  try {
    Thread.sleep(Integer.MAX_VALUE);
  }
 catch (  InterruptedException ignored) {
  }
}

Fixed version (ground truth):
public MondrianStarter(String dataFileName){
  MonFrame monFrame=new MonFrame();
  MRJApplicationUtils.registerOpenDocumentHandler(this);
  if (dataFileName != null) {
    File dataFile=new File(dataFileName);
    if (dataFile.canRead()) {
      if (dataFile.getName().endsWith("String_Node_Str")) {
        new DataFrameConverter(monFrame).loadDataFrame(dataFile);
      }
 else {
        monFrame.getController().loadDataSet(dataFile,dataFile.getName());
      }
    }
  }
  try {
    Thread.sleep(Integer.MAX_VALUE);
  }
 catch (  InterruptedException ignored) {
  }
}
Program: 180062
Project: 180062
Buggy source:
public void setProgText(String msg){
}

Fixed version (ground truth):
public void setProgText(String msg){
  setTitle(msg);
}
Program: 180063
Project: 180063
Buggy source:
public JProgressBar getProgBar(){
  return null;
}

Fixed version (ground truth):
public JProgressBar getProgBar(){
  return progBar;
}
Program: 180064
Project: 180064
Buggy source:
public ProgIndicatorImpl(){
  setSize(300,300);
  setLayout(new BorderLayout());
  progBar.setMinimum(0);
  progBar.setMaximum(100);
  add(progBar,BorderLayout.CENTER);
  setModal(true);
  setVisible(true);
}

Fixed version (ground truth):
public ProgIndicatorImpl(){
  setSize(200,30);
  setLayout(new BorderLayout());
  progBar.setMinimum(0);
  progBar.setMaximum(100);
  add(progBar,BorderLayout.CENTER);
  setLocationRelativeTo(null);
  setVisible(true);
}
Program: 180065
Project: 180065
Buggy source:
private static SessionFactory buildSessionFactory(){
  try {
    return new AnnotationConfiguration().configure().buildSessionFactory();
  }
 catch (  Throwable ex) {
    System.err.println("String_Node_Str" + ex);
    throw new ExceptionInInitializerError(ex);
  }
}

Fixed version (ground truth):
private static SessionFactory buildSessionFactory(){
  try {
    return new AnnotationConfiguration().configure().buildSessionFactory();
  }
 catch (  Throwable ex) {
    log.error("String_Node_Str" + ex);
    throw new ExceptionInInitializerError(ex);
  }
}
Program: 180066
Project: 180066
Buggy source:
/** 
 * Randomly generates a short code of 6 characters
 * @return
 */
public static String generateShortCode(){
  StringBuffer buffer=new StringBuffer();
  for (int i=0; i < 6; i++) {
    int r=random.nextInt(CHARSET.length());
    buffer.append(CHARSET.charAt(r));
  }
  return buffer.toString();
}

Fixed version (ground truth):
/** 
 * Randomly generates a short code of 6 characters
 * @return
 */
public static String generateShortCode(){
  StringBuilder buffer=new StringBuilder();
  for (int i=0; i < 6; i++) {
    int r=random.nextInt(CHARSET.length());
    buffer.append(CHARSET.charAt(r));
  }
  return buffer.toString();
}
Program: 180067
Project: 180067
Buggy source:
private LinkController initLinkController(){
  String persistence=request.getSession().getServletContext().getInitParameter("String_Node_Str");
  if (persistence != null && "String_Node_Str".equals(persistence.toLowerCase())) {
    return new HibernateLinkController();
  }
  return new SimpleDBLinkController();
}

Fixed version (ground truth):
private LinkDAO initLinkController(){
  String persistence=request.getSession().getServletContext().getInitParameter("String_Node_Str");
  if (persistence != null && "String_Node_Str".equals(persistence.toLowerCase())) {
    return new HibernateLinkDAO();
  }
  return new SimpleDBLinkDAO();
}
Program: 180068
Project: 180068
Buggy source:
private LinkController getLinkController(){
  if (linkController == null) {
    linkController=initLinkController();
  }
  return linkController;
}

Fixed version (ground truth):
private LinkDAO getLinkController(){
  if (linkController == null) {
    linkController=initLinkController();
  }
  return linkController;
}
Program: 180069
Project: 180069
Buggy source:
void saveClayBlocks(){
  LinkedList<SaveBlock> glocations=new LinkedList<SaveBlock>();
  Collection<ClayDelay> cblock=clayblocks.values();
  for (  Object oblock : cblock) {
    ClayDelay theblock=(ClayDelay)oblock;
    glocations.add(new SaveBlock(theblock));
  }
  try {
    ObjectOutputStream out=new ObjectOutputStream(new FileOutputStream(new File(claySaveFile)));
    out.writeObject(glocations);
    out.flush();
    out.close();
  }
 catch (  Exception e) {
    if (debug) {
      System.out.println("String_Node_Str");
      System.out.println(e);
    }
  }
}

Fixed version (ground truth):
void saveClayBlocks(){
  LinkedList<SaveBlock> glocations=new LinkedList<SaveBlock>();
  Collection<ClayDelay> cblock=clayblocks.values();
  for (  ClayDelay theblock : cblock) {
    glocations.add(new SaveBlock(theblock));
  }
  try {
    ObjectOutputStream out=new ObjectOutputStream(new FileOutputStream(new File(claySaveFile)));
    out.writeObject(glocations);
    out.flush();
    out.close();
  }
 catch (  Exception e) {
    if (true) {
      System.out.println("String_Node_Str");
      System.out.println(e);
    }
  }
}
Program: 180070
Project: 180070
Buggy source:
private void loadBlocks(){
  try {
    ObjectInputStream out=new ObjectInputStream(new FileInputStream(new File(blockSaveFile)));
    if (debug) {
      System.out.println("String_Node_Str");
    }
    LinkedList<SaveBlock> glocations=(LinkedList<SaveBlock>)out.readObject();
    if (debug) {
      System.out.println("String_Node_Str");
    }
    newgravellist.clear();
    for (    SaveBlock blocklocation : glocations) {
      org.bukkit.World theworld=getServer().getWorld(blocklocation.getWorld());
      Location lblock=new Location(theworld,blocklocation.getX(),blocklocation.getY(),blocklocation.getZ());
      Block theblock=lblock.getBlock();
      newgravellist.put(getBlockString(theblock),new ClayDelay(theblock,blocklocation.getDelayvalue(),blocklocation.getIntime()));
    }
    if (debug) {
      System.out.println("String_Node_Str");
    }
  }
 catch (  Exception e) {
    if (debug) {
      System.out.println("String_Node_Str");
      System.out.println(e);
    }
  }
}

Fixed version (ground truth):
private void loadBlocks(){
  try {
    ObjectInputStream out=new ObjectInputStream(new FileInputStream(new File(blockSaveFile)));
    if (debug) {
      System.out.println("String_Node_Str");
    }
    LinkedList<SaveBlock> glocations=(LinkedList<SaveBlock>)out.readObject();
    if (debug) {
      System.out.println("String_Node_Str");
    }
    newgravellist.clear();
    for (    SaveBlock blocklocation : glocations) {
      org.bukkit.World theworld=getServer().getWorld(blocklocation.getWorld());
      Location lblock=new Location(theworld,blocklocation.getX(),blocklocation.getY(),blocklocation.getZ());
      Block theblock=lblock.getBlock();
      if (loadchunks) {
        addBlockToChunk(theblock);
      }
      newgravellist.put(getBlockString(theblock),new ClayDelay(theblock,blocklocation.getDelayvalue(),blocklocation.getIntime()));
    }
    if (debug) {
      System.out.println("String_Node_Str");
    }
  }
 catch (  Exception e) {
    if (debug) {
      System.out.println("String_Node_Str");
      System.out.println(e);
    }
  }
}
Program: 180072
Project: 180072
Buggy source:
public synchronized void onEnable(){
  PluginManager pm=getServer().getPluginManager();
  pm.registerEvent(Event.Type.BLOCK_FROMTO,blockListener,Priority.Normal,this);
  if (clayfarm) {
    pm.registerEvent(Event.Type.BLOCK_PLACE,blockListener,Priority.Normal,this);
    loadBlocks();
    if (slowserver) {
      getServer().getScheduler().scheduleSyncRepeatingTask(this,new ClayUpdate(this),50L,25L);
    }
 else {
      getServer().getScheduler().scheduleSyncRepeatingTask(this,new ClayUpdate(this),200L,100L);
    }
    dispatchThread=new Thread(this);
    dispatchThread.start();
  }
  if (customdrops) {
    loadClayBlocks();
    pm.registerEvent(Event.Type.BLOCK_BREAK,blockListener,Priority.Normal,this);
    pm.registerEvent(Event.Type.BLOCK_PHYSICS,blockListener,Priority.Normal,this);
  }
 else   if (defaultclaydrop != 4 && defaultclaydrop > 0) {
    pm.registerEvent(Event.Type.BLOCK_BREAK,blockListener,Priority.Normal,this);
  }
  PluginDescriptionFile pdfFile=this.getDescription();
  System.out.println(pdfFile.getName() + "String_Node_Str" + pdfFile.getVersion()+ "String_Node_Str");
}

Fixed version (ground truth):
public synchronized void onEnable(){
  PluginManager pm=getServer().getPluginManager();
  pm.registerEvent(Event.Type.BLOCK_FROMTO,blockListener,Priority.Normal,this);
  if (clayfarm) {
    pm.registerEvent(Event.Type.BLOCK_PLACE,blockListener,Priority.Normal,this);
    loadBlocks();
    if (slowserver) {
      getServer().getScheduler().scheduleSyncRepeatingTask(this,new ClayUpdate(this),50L,25L);
    }
 else {
      getServer().getScheduler().scheduleSyncRepeatingTask(this,new ClayUpdate(this),200L,100L);
    }
    dispatchThread=new Thread(this);
    dispatchThread.start();
  }
  if (customdrops) {
    loadClayBlocks();
    pm.registerEvent(Event.Type.BLOCK_BREAK,blockListener,Priority.Normal,this);
    pm.registerEvent(Event.Type.BLOCK_PHYSICS,blockListener,Priority.Normal,this);
  }
 else   if (defaultclaydrop != 4 && defaultclaydrop > 0) {
    pm.registerEvent(Event.Type.BLOCK_BREAK,blockListener,Priority.Normal,this);
  }
  if (loadchunks) {
    ClaygenWorldListener cu=new ClaygenWorldListener(this);
    pm.registerEvent(Event.Type.CHUNK_UNLOAD,cu,Priority.Normal,this);
  }
  PluginDescriptionFile pdfFile=this.getDescription();
  System.out.println(pdfFile.getName() + "String_Node_Str" + pdfFile.getVersion()+ "String_Node_Str");
}
Program: 180073
Project: 180073
Buggy source:
public synchronized void gravelPlaced(Block thegravelblock){
  if (thegravelblock.getTypeId() == GRAVEL && (mcmmomode || thegravelblock.getRelative(BlockFace.DOWN).getTypeId() == activateblock)) {
    if (!newgravellist.containsKey(getBlockString(thegravelblock))) {
      boolean alreadyupdated=false;
      if (waterenabled) {
        if (hasBlockNextTo(thegravelblock,WATER,FLOWINGWATER)) {
          newgravellist.put(getBlockString(thegravelblock),new ClayDelay(thegravelblock));
          if (newgravellist.size() <= 1) {
            dispatchThread.interrupt();
          }
          alreadyupdated=true;
        }
      }
      if (lavaenabled && !alreadyupdated) {
        if (hasBlockNextTo(thegravelblock,LAVA,FLOWINGLAVA)) {
          newgravellist.put(getBlockString(thegravelblock),new ClayDelay(thegravelblock));
          if (newgravellist.size() <= 1) {
            dispatchThread.interrupt();
          }
        }
      }
    }
  }
}

Fixed version (ground truth):
public synchronized void gravelPlaced(Block thegravelblock){
  if (debug) {
    System.out.println("String_Node_Str");
  }
  if (thegravelblock.getTypeId() == GRAVEL && (mcmmomode || thegravelblock.getRelative(BlockFace.DOWN).getTypeId() == activateblock)) {
    if (!newgravellist.containsKey(getBlockString(thegravelblock))) {
      boolean alreadyupdated=false;
      if (waterenabled) {
        if (hasBlockNextTo(thegravelblock,WATER,FLOWINGWATER)) {
          if (loadchunks) {
            addBlockToChunk(thegravelblock);
          }
          newgravellist.put(getBlockString(thegravelblock),new ClayDelay(thegravelblock));
          if (newgravellist.size() <= 1) {
            dispatchThread.interrupt();
          }
          alreadyupdated=true;
        }
      }
      if (lavaenabled && !alreadyupdated) {
        if (hasBlockNextTo(thegravelblock,LAVA,FLOWINGLAVA)) {
          if (loadchunks) {
            addBlockToChunk(thegravelblock);
          }
          newgravellist.put(getBlockString(thegravelblock),new ClayDelay(thegravelblock));
          if (newgravellist.size() <= 1) {
            dispatchThread.interrupt();
          }
        }
      }
    }
  }
}
Program: 180074
Project: 180074
Buggy source:
private void saveBlocks(){
  LinkedList<SaveBlock> glocations=new LinkedList<SaveBlock>();
  Enumeration<ClayDelay> gravellist=newgravellist.elements();
  while (gravellist.hasMoreElements()) {
    glocations.add(new SaveBlock(gravellist.nextElement()));
  }
  try {
    ObjectOutputStream out=new ObjectOutputStream(new FileOutputStream(new File(blockSaveFile)));
    out.writeObject(glocations);
    out.flush();
    out.close();
  }
 catch (  Exception e) {
    if (debug) {
      System.out.println("String_Node_Str");
      System.out.println(e);
    }
  }
}

Fixed version (ground truth):
private void saveBlocks(){
  if (debug) {
    System.out.println("String_Node_Str");
  }
  LinkedList<SaveBlock> glocations=new LinkedList<SaveBlock>();
  Enumeration<ClayDelay> gravellist=newgravellist.elements();
  while (gravellist.hasMoreElements()) {
    glocations.add(new SaveBlock(gravellist.nextElement()));
  }
  try {
    ObjectOutputStream out=new ObjectOutputStream(new FileOutputStream(new File(blockSaveFile)));
    out.writeObject(glocations);
    out.flush();
    out.close();
  }
 catch (  Exception e) {
    if (debug) {
      System.out.println("String_Node_Str");
      System.out.println(e);
    }
  }
}
Program: 180076
Project: 180076
Buggy source:
public void clayWaterRemoved(Block block){
  if (clayblocks.containsKey(compileBlockString(block))) {
    ClayDelay theblock=clayblocks.get(compileBlockString(block));
    try {
      block.setData((byte)getNumberOfDrops(theblock));
    }
 catch (    StackOverflowError e) {
    }
    clayblocks.remove(compileBlockString(block));
    saveClayBlocks();
  }
}

Fixed version (ground truth):
public void clayWaterRemoved(Block block){
  if (clayblocks.containsKey(compileBlockString(block))) {
    ClayDelay theblock=clayblocks.get(compileBlockString(block));
    try {
      clayblocks.remove(compileBlockString(block));
      block.setData((byte)getNumberOfDrops(theblock));
    }
 catch (    StackOverflowError e) {
    }
    saveClayBlocks();
  }
}
Program: 180077
Project: 180077
Buggy source:
/** 
 * @param args
 */
public static void main(String[] args){
  SudokuPuzzle puzzle=new SudokuPuzzle("String_Node_Str");
  puzzle.printPuzzle();
  long start=System.currentTimeMillis();
  puzzle.solve();
  long stop=System.currentTimeMillis();
  puzzle.printPuzzle();
  System.out.println((stop - start) + "String_Node_Str");
}

Fixed version (ground truth):
/** 
 * @param args
 */
public static void main(String[] args){
  SudokuPuzzle puzzle=new SudokuPuzzle("String_Node_Str");
  puzzle.printPuzzle();
  long start=System.currentTimeMillis();
  puzzle.solve();
  puzzle.checkRowsCols();
  long stop=System.currentTimeMillis();
  puzzle.printPuzzle();
  System.out.println((stop - start) + "String_Node_Str");
}
Program: 180078
Project: 180078
Buggy source:
/** 
 * Row and Column Checker collect any hints that is not shared by any other. if hint is not shared by any other, it is the answer/Value for its owner.
 */
public void RCChecker(Cell[] col){
  int[] hintCounter=new int[9];
  Cell[] owner=new Cell[9];
  for (int i=0; i < 9; i++) {
    if (col[i].getValue() > 0)     continue;
    ArrayList<Integer> hints=col[i].getHints();
    for (int j=0; j < hints.size(); j++) {
      int hintVal=hints.get(j) - 1;
      if (owner[hintVal] == null)       owner[hintVal]=col[i];
      hintCounter[hintVal]++;
    }
  }
  for (int i=0; i < 9; i++) {
    if (hintCounter[i] == 1) {
      owner[i].setValue(i);
      System.out.println(col[i].toString());
    }
  }
}

Fixed version (ground truth):
/** 
 * Row and Column Checker collect any hints that is not shared by any other. if hint is not shared by any other, it is the answer/Value for its owner.
 */
public void RCChecker(Cell[] col){
  int[] hintCounter=new int[9];
  Cell[] owner=new Cell[9];
  for (int i=0; i < 9; i++) {
    if (col[i].getValue() > 0)     continue;
    ArrayList<Integer> hints=col[i].getHints();
    for (int j=0; j < hints.size(); j++) {
      int hintVal=hints.get(j) - 1;
      if (owner[hintVal] == null)       owner[hintVal]=col[i];
      hintCounter[hintVal]++;
    }
  }
  for (int i=0; i < 9; i++) {
    if (hintCounter[i] == 1) {
      owner[i].setValue(i + 1);
      System.out.println(col[i].toString());
    }
  }
}
Program: 180079
Project: 180079
Buggy source:
/** 
 * Function to get the specified row
 * @param row
 * @return
 */
public Cell[] getRow(int row){
  return _puzzle[row];
}

Fixed version (ground truth):
/** 
 * Function to get the specified row
 * @param row
 * @return
 */
public Cell[] getRow(int row){
  Cell[] r=new Cell[9];
  for (int x=0; x < 9; x++) {
    r[x]=_puzzle[row][x];
  }
  return r;
}
Program: 180080
Project: 180080
Buggy source:
public String toString(){
  return "String_Node_Str" + this.x + "String_Node_Str"+ this.y+ "String_Node_Str"+ this.value;
}

Fixed version (ground truth):
/** 
 * @return String representation of the Cell
 */
public String toString(){
  return "String_Node_Str" + this.x + "String_Node_Str"+ this.y+ "String_Node_Str"+ this.value;
}
Program: 180081
Project: 180081
Buggy source:
void RCChecker(Cell[] col){
}

Fixed version (ground truth):
void RCChecker(Cell[] col){
  int[] hintCounter=new int[9];
  Cell[] owner=new Cell[9];
  for (int i=0; i < 9; i++) {
    if (col[i].getValue() > 0)     continue;
    ArrayList<Integer> hints=col[i].getHints();
    for (int j=0; j < hints.size(); j++) {
      int hintVal=hints.get(j) - 1;
      if (owner[hintVal] == null)       owner[hintVal]=col[i];
      hintCounter[hintVal]++;
    }
  }
  for (int i=0; i < 9; i++) {
    if (hintCounter[i] == 1) {
      owner[i].setValue(i);
      System.out.println(col[i].toString());
    }
  }
}
Program: 180082
Project: 180082
Buggy source:
private String levelString(int level){
switch (level) {
case LogService.LOG_DEBUG:
    return "String_Node_Str";
case LogService.LOG_ERROR:
  return "String_Node_Str";
case LogService.LOG_INFO:
return "String_Node_Str";
case LogService.LOG_WARNING:
return "String_Node_Str";
default :
return "String_Node_Str";
}
}

Fixed version (ground truth):
/** 
 * Convert the log level int into a human-readable string.  See org.osgi.service.log.LogService for details.
 * @param level log level
 * @return human-readable string
 */
private String levelString(int level){
switch (level) {
case LogService.LOG_DEBUG:
    return "String_Node_Str";
case LogService.LOG_ERROR:
  return "String_Node_Str";
case LogService.LOG_INFO:
return "String_Node_Str";
case LogService.LOG_WARNING:
return "String_Node_Str";
default :
return "String_Node_Str";
}
}
Program: 180084
Project: 180084
Buggy source:
private String parseChecksum(String sentence){
  String[] splitSentence=sentence.split(CHECKSUM_SEPARATOR);
  if (splitSentence.length > 1) {
    checksum=splitSentence[1];
  }
  return splitSentence[0];
}

Fixed version (ground truth):
private String parseChecksum(String sentence){
  String[] splitSentence=sentence.split("String_Node_Str" + CHECKSUM_SEPARATOR);
  if (splitSentence.length > 1) {
    checksum=splitSentence[1];
  }
  return splitSentence[0];
}
Program: 180086
Project: 180086
Buggy source:
public int LEDGreenOff() throws IOException {
  int result=-1;
  if (gpsControl != null) {
    result=gpsControl.ioctl_BMI_GPS_GLEDOFF();
  }
  if (result < 0) {
    throw new IOException("String_Node_Str");
  }
  return result;
}

Fixed version (ground truth):
/** 
 * @return
 * @throws IOException
 */
public int LEDGreenOff() throws IOException {
  int result=-1;
  if (gpsControl != null) {
    result=gpsControl.ioctl_BMI_GPS_GLEDOFF();
  }
  if (result < 0) {
    throw new IOException("String_Node_Str");
  }
  return result;
}
Program: 180087
Project: 180087
Buggy source:
public int LEDRedOn() throws IOException {
  int result=-1;
  if (gpsControl != null) {
    result=gpsControl.ioctl_BMI_GPS_RLEDON();
  }
  if (result < 0) {
    throw new IOException("String_Node_Str");
  }
  return result;
}

Fixed version (ground truth):
/** 
 * @return
 * @throws IOException
 */
public int LEDRedOn() throws IOException {
  int result=-1;
  if (gpsControl != null) {
    result=gpsControl.ioctl_BMI_GPS_RLEDON();
  }
  if (result < 0) {
    throw new IOException("String_Node_Str");
  }
  return result;
}
Program: 180088
Project: 180088
Buggy source:
public List<IModuleProperty> getModuleProperties(){
  List<IModuleProperty> mprops=super.getModuleProperties();
  try {
    int status=getStatus();
    status&=0xFF;
    String status_str=Integer.toHexString(status);
    mprops.add(new ModuleProperty(PROPERTY_IOX,"String_Node_Str" + status_str,"String_Node_Str",false));
    mprops.add(new ModuleProperty(PROPERTY_GPS_FIX,Boolean.toString((status&=0x1) == 0)));
    String antenna=PROPERTY_ANTENNA_ACTIVE;
    if ((status & 0xC0) == IGPSModuleControl.STATUS_PASSIVE_ANTENNA) {
      antenna=PROPERTY_ANTENNA_PASSIVE;
    }
    mprops.add(new ModuleProperty(PROPERTY_ANTENNA,antenna,"String_Node_Str",false));
  }
 catch (  IOException e) {
    getLog().log(LogService.LOG_ERROR,"String_Node_Str",e);
  }
  return mprops;
}

Fixed version (ground truth):
public List<IModuleProperty> getModuleProperties(){
  List<IModuleProperty> mprops=super.getModuleProperties();
  try {
    int status=getStatus();
    status&=0xFF;
    String statusValue=Integer.toHexString(status);
    mprops.add(new ModuleProperty(PROPERTY_IOX,"String_Node_Str" + statusValue,"String_Node_Str",false));
    mprops.add(new ModuleProperty(PROPERTY_GPS_FIX,Boolean.toString((status&=0x1) == 0)));
    String antenna=PROPERTY_ANTENNA_ACTIVE;
    if ((status & 0xC0) == IGPSModuleControl.STATUS_PASSIVE_ANTENNA) {
      antenna=PROPERTY_ANTENNA_PASSIVE;
    }
    mprops.add(new ModuleProperty(PROPERTY_ANTENNA,antenna,"String_Node_Str",false));
  }
 catch (  IOException e) {
    getLog().log(LogService.LOG_ERROR,"String_Node_Str",e);
  }
  return mprops;
}
Program: 180089
Project: 180089
Buggy source:
private boolean isAntennaExternal() throws IOException {
  return (getStatus() & 0xC0) == 0x40;
}

Fixed version (ground truth):
/** 
 * @return true if antenna mode is 'external', false otherwise.
 * @throws IOException on device I/O error
 */
private boolean isAntennaExternal() throws IOException {
  return (getStatus() & 0xC0) == 0x40;
}
Program: 180090
Project: 180090
Buggy source:
private void updateIModuleControlProperties(){
  if (moduleReg != null) {
    Dictionary modProperties=createBasicServiceProperties();
    modProperties.put("String_Node_Str",suspended ? "String_Node_Str" : "String_Node_Str");
    moduleReg.setProperties(modProperties);
  }
}

Fixed version (ground truth):
/** 
 * Update module properties based on internal state.
 */
private void updateIModuleControlProperties(){
  if (moduleReg != null) {
    Dictionary modProperties=createBasicServiceProperties();
    modProperties.put("String_Node_Str",suspended ? "String_Node_Str" : "String_Node_Str");
    moduleReg.setProperties(modProperties);
  }
}
Program: 180091
Project: 180091
Buggy source:
private String getPositionXml(){
  Position p=getPosition();
  XmlNode root=new XmlNode("String_Node_Str");
  if (p != null) {
    if (p.getLatitude() != null) {
      root.addChild(new XmlNode("String_Node_Str",p.getLatitude().toString()));
    }
    if (p.getLongitude() != null) {
      root.addChild(new XmlNode("String_Node_Str",p.getLongitude().toString()));
    }
    if (p.getAltitude() != null) {
      root.addChild(new XmlNode("String_Node_Str",p.getAltitude().toString()));
    }
    RMC rmc=nmeaProvider.getLastRMC();
    DegreesMinutesSeconds dmsLat=rmc.getLatitudeAsDMS();
    DegreesMinutesSeconds dmsLon=rmc.getLongitudeAsDMS();
    if (dmsLat != null) {
      root.addChild(new XmlNode("String_Node_Str",Double.toString(dmsLat.toDecimalDegrees())));
    }
    if (dmsLon != null) {
      root.addChild(new XmlNode("String_Node_Str",Double.toString(dmsLon.toDecimalDegrees())));
    }
  }
  return root.toString();
}

Fixed version (ground truth):
/** 
 * @return a String containing the location retrieved from GPS device in XML format.
 */
private String getPositionXml(){
  Position p=getPosition();
  XmlNode root=new XmlNode("String_Node_Str");
  if (p != null) {
    if (p.getLatitude() != null) {
      root.addChild(new XmlNode("String_Node_Str",p.getLatitude().toString()));
    }
    if (p.getLongitude() != null) {
      root.addChild(new XmlNode("String_Node_Str",p.getLongitude().toString()));
    }
    if (p.getAltitude() != null) {
      root.addChild(new XmlNode("String_Node_Str",p.getAltitude().toString()));
    }
    RMC rmc=nmeaProvider.getLastRMC();
    DegreesMinutesSeconds dmsLat=rmc.getLatitudeAsDMS();
    DegreesMinutesSeconds dmsLon=rmc.getLongitudeAsDMS();
    if (dmsLat != null) {
      root.addChild(new XmlNode("String_Node_Str",Double.toString(dmsLat.toDecimalDegrees())));
    }
    if (dmsLon != null) {
      root.addChild(new XmlNode("String_Node_Str",Double.toString(dmsLon.toDecimalDegrees())));
    }
  }
  return root.toString();
}
Program: 180092
Project: 180092
Buggy source:
private Dictionary createBasicServiceProperties(){
  Dictionary d=getCommonProperties();
  try {
    d.remove(EXTERNAL_ANTENNA_PROPERTY);
    d.put(EXTERNAL_ANTENNA_PROPERTY,"String_Node_Str" + isAntennaExternal());
  }
 catch (  IOException e) {
    getLog().log(LogService.LOG_ERROR,"String_Node_Str",e);
  }
  return d;
}

Fixed version (ground truth):
/** 
 * @return A dictionary of properties for the OSGi service registry.
 */
private Dictionary createBasicServiceProperties(){
  Dictionary d=getCommonProperties();
  try {
    d.remove(EXTERNAL_ANTENNA_PROPERTY);
    d.put(EXTERNAL_ANTENNA_PROPERTY,"String_Node_Str" + isAntennaExternal());
  }
 catch (  IOException e) {
    getLog().log(LogService.LOG_ERROR,"String_Node_Str",e);
  }
  return d;
}
Program: 180093
Project: 180093
Buggy source:
public int resume() throws IOException {
  int result=-1;
  result=gpsControl.ioctl_BMI_GPS_RESUME();
  suspended=false;
  if (result < 0) {
    throw new IOException("String_Node_Str");
  }
  suspended=false;
  updateIModuleControlProperties();
  return result;
}

Fixed version (ground truth):
public int resume() throws IOException {
  getBMIDevice().resume();
  suspended=false;
  updateIModuleControlProperties();
  return 0;
}
Program: 180094
Project: 180094
Buggy source:
public int suspend() throws IOException {
  int result=-1;
  result=gpsControl.ioctl_BMI_GPS_SUSPEND();
  if (result < 0) {
    throw new IOException("String_Node_Str");
  }
  suspended=true;
  updateIModuleControlProperties();
  return result;
}

Fixed version (ground truth):
public int suspend() throws IOException {
  getBMIDevice().suspend();
  suspended=true;
  updateIModuleControlProperties();
  return 0;
}
Program: 180095
Project: 180095
Buggy source:
public int LEDGreenOn() throws IOException {
  int result=-1;
  if (gpsControl != null) {
    result=gpsControl.ioctl_BMI_GPS_GLEDON();
  }
  if (result < 0) {
    throw new IOException("String_Node_Str");
  }
  return result;
}

Fixed version (ground truth):
/** 
 * @return
 * @throws IOException
 */
public int LEDGreenOn() throws IOException {
  int result=-1;
  if (gpsControl != null) {
    result=gpsControl.ioctl_BMI_GPS_GLEDON();
  }
  if (result < 0) {
    throw new IOException("String_Node_Str");
  }
  return result;
}
Program: 180096
Project: 180096
Buggy source:
public void start() throws Exception {
  boolean retry=false;
  int count=0;
  do {
    getLog().log(LogService.LOG_INFO,"String_Node_Str");
    try {
      setActiveAntenna();
      retry=false;
    }
 catch (    IOException e) {
      getLog().log(LogService.LOG_ERROR,"String_Node_Str",e);
      retry=true;
      Thread.sleep(200);
      count++;
    }
  }
 while (retry && count < 10);
  nmeaProvider.start();
  Dictionary properties=createBasicServiceProperties();
  properties.put("String_Node_Str",suspended ? "String_Node_Str" : "String_Node_Str");
  moduleReg=context.registerService(IModuleControl.class.getName(),this,properties);
  registerService(IModuleLEDController.class.getName(),this,createBasicServiceProperties());
  registerService(IGPSModuleControl.class.getName(),this,createBasicServiceProperties());
  registerService(INMEARawFeed.class.getName(),new NMEARawFeed(gpsInputStream),createBasicServiceProperties());
  registerService(INMEASentenceProvider.class.getName(),nmeaProvider,createBasicServiceProperties());
  registerService(PublicWSProvider.class.getName(),this,null);
  timer=new Timer();
  timer.schedule(new GPSFIXLEDStatusTask(this,getLog()),500,GPS_STATUS_SCAN_INTERVAL);
  registerService(IPositionProvider.class.getName(),this,createBasicServiceProperties());
  context.addServiceListener(nmeaProvider,FilterUtil.generateServiceFilter(INMEASentenceSubscriber.class.getName(),IPositionSubscriber.class.getName()));
}

Fixed version (ground truth):
public void start() throws Exception {
  boolean retry=false;
  int count=0;
  do {
    getLog().log(LogService.LOG_INFO,"String_Node_Str");
    try {
      setActiveAntenna();
      retry=false;
    }
 catch (    IOException e) {
      getLog().log(LogService.LOG_ERROR,"String_Node_Str",e);
      retry=true;
      Thread.sleep(ANTENNA_SET_RETRY_INTERVAL_MILLIS);
      count++;
    }
  }
 while (retry && count < GPS_SET_ANTENNA_MAX_RETRIES);
  nmeaProvider.start();
  Dictionary properties=createBasicServiceProperties();
  properties.put("String_Node_Str",suspended ? "String_Node_Str" : "String_Node_Str");
  moduleReg=context.registerService(IModuleControl.class.getName(),this,properties);
  registerService(IModuleLEDController.class.getName(),this,createBasicServiceProperties());
  registerService(IGPSModuleControl.class.getName(),this,createBasicServiceProperties());
  registerService(INMEARawFeed.class.getName(),new NMEARawFeed(gpsInputStream),createBasicServiceProperties());
  registerService(INMEASentenceProvider.class.getName(),nmeaProvider,createBasicServiceProperties());
  registerService(PublicWSProvider.class.getName(),this,null);
  timer=new Timer();
  timer.schedule(new GPSFIXLEDStatusTask(this,getLog()),GPS_STATUS_SCAN_INTERVAL,GPS_STATUS_SCAN_INTERVAL);
  registerService(IPositionProvider.class.getName(),this,createBasicServiceProperties());
  context.addServiceListener(nmeaProvider,FilterUtil.generateServiceFilter(INMEASentenceSubscriber.class.getName(),IPositionSubscriber.class.getName()));
}
Program: 180097
Project: 180097
Buggy source:
public int LEDRedOff() throws IOException {
  int result=-1;
  if (gpsControl != null) {
    result=gpsControl.ioctl_BMI_GPS_RLEDOFF();
  }
  if (result < 0) {
    throw new IOException("String_Node_Str");
  }
  return result;
}

Fixed version (ground truth):
/** 
 * @return
 * @throws IOException
 */
public int LEDRedOff() throws IOException {
  int result=-1;
  if (gpsControl != null) {
    result=gpsControl.ioctl_BMI_GPS_RLEDOFF();
  }
  if (result < 0) {
    throw new IOException("String_Node_Str");
  }
  return result;
}
Program: 180098
Project: 180098
Buggy source:
@Override public void run(Map<Object,Object> services){
  LogManager.logInfo("String_Node_Str");
  service=(ISewingService)services.get(ISewingService.class.getName());
  mainServlet=new BUGwebAdminServlet();
  hardwareServlet=new BUGwebAdminHardwareServlet();
  systemServlet=new BUGwebAdminSystemServlet();
  softwareServlet=new BUGwebAdminSoftwareServlet();
  bugnetServlet=new BUGwebAdminBUGnetServlet();
  utilsServlet=new BUGwebAdminUtilsServlet();
  imageServlet=new BUGwebFileServlet();
  service.register(context,"String_Node_Str",mainServlet);
  service.register(context,"String_Node_Str",hardwareServlet);
  service.register(context,"String_Node_Str",systemServlet);
  service.register(context,"String_Node_Str",softwareServlet);
  service.register(context,"String_Node_Str",bugnetServlet);
  service.register(context,"String_Node_Str",utilsServlet);
  service.register(context,"String_Node_Str",imageServlet);
  try {
    moduleTracker=new ServiceTracker(context,FilterUtil.generateServiceFilter(context,new String[]{IModuleControl.class.getName()}),new BUGwebAdminModuleControlServiceTracker(context));
    moduleTracker.open();
  }
 catch (  InvalidSyntaxException e) {
  }
}

Fixed version (ground truth):
@Override public void run(Map<String,Object> services){
  LogManager.logInfo("String_Node_Str");
  service=(ISewingService)services.get(ISewingService.class.getName());
  mainServlet=new BUGwebAdminServlet();
  hardwareServlet=new BUGwebAdminHardwareServlet();
  systemServlet=new BUGwebAdminSystemServlet();
  softwareServlet=new BUGwebAdminSoftwareServlet();
  bugnetServlet=new BUGwebAdminBUGnetServlet();
  utilsServlet=new BUGwebAdminUtilsServlet();
  imageServlet=new BUGwebFileServlet();
  service.register(context,"String_Node_Str",mainServlet);
  service.register(context,"String_Node_Str",hardwareServlet);
  service.register(context,"String_Node_Str",systemServlet);
  service.register(context,"String_Node_Str",softwareServlet);
  service.register(context,"String_Node_Str",bugnetServlet);
  service.register(context,"String_Node_Str",utilsServlet);
  service.register(context,"String_Node_Str",imageServlet);
  try {
    moduleTracker=new ServiceTracker(context,FilterUtil.generateServiceFilter(context,new String[]{IModuleControl.class.getName()}),new BUGwebAdminModuleControlServiceTracker(context));
    moduleTracker.open();
  }
 catch (  InvalidSyntaxException e) {
  }
}
Program: 180099
Project: 180099
Buggy source:
@Override public void run(Map<Object,Object> services){
  display=(IModuleDisplay)services.get(IModuleDisplay.class.getName());
  networking=(INetworking)services.get(INetworking.class.getName());
  wifiAccessPointPicker=new WifiAccessPointPicker(networking,context);
  networkSettingsEditor=new NetworkSettingsEditor(networking,context);
  deviceActivator=new DeviceActivator(networking,context);
  registerDesktopApp();
}

Fixed version (ground truth):
@Override public void run(Map<String,Object> services){
  display=(IModuleDisplay)services.get(IModuleDisplay.class.getName());
  networking=(INetworking)services.get(INetworking.class.getName());
  wifiAccessPointPicker=new WifiAccessPointPicker(networking,context);
  networkSettingsEditor=new NetworkSettingsEditor(networking,context);
  deviceActivator=new DeviceActivator(networking,context);
  registerDesktopApp();
}
Program: 180100
Project: 180100
Buggy source:
public void start(BundleContext ctx) throws Exception {
  this.context=ctx;
  logger=LogServiceUtil.getLogService(context);
  Activator.logDebug("String_Node_Str");
  serviceTracker=ServiceTrackerUtil.openServiceTracker(context,new ServiceTrackerUtil.ManagedInlineRunnable(){
    @Override public void run(    Map<Object,Object> services){
      display=(IModuleDisplay)services.get(IModuleDisplay.class.getName());
      networking=(INetworking)services.get(INetworking.class.getName());
      wifiAccessPointPicker=new WifiAccessPointPicker(networking,context);
      networkSettingsEditor=new NetworkSettingsEditor(networking,context);
      deviceActivator=new DeviceActivator(networking,context);
      registerDesktopApp();
    }
    @Override public void shutdown(){
      unregisterDesktopApp();
    }
  }
,services);
}

Fixed version (ground truth):
public void start(BundleContext ctx) throws Exception {
  this.context=ctx;
  logger=LogServiceUtil.getLogService(context);
  Activator.logDebug("String_Node_Str");
  serviceTracker=ServiceTrackerUtil.openServiceTracker(context,new ServiceTrackerUtil.ManagedInlineRunnable(){
    @Override public void run(    Map<String,Object> services){
      display=(IModuleDisplay)services.get(IModuleDisplay.class.getName());
      networking=(INetworking)services.get(INetworking.class.getName());
      wifiAccessPointPicker=new WifiAccessPointPicker(networking,context);
      networkSettingsEditor=new NetworkSettingsEditor(networking,context);
      deviceActivator=new DeviceActivator(networking,context);
      registerDesktopApp();
    }
    @Override public void shutdown(){
      unregisterDesktopApp();
    }
  }
,services);
}
Program: 180101
Project: 180101
Buggy source:
@Override public void run(Map<Object,Object> services){
  this.httpService=(HttpService)services.get(HttpService.class.getName());
  try {
    logService.log(LogService.LOG_INFO,"String_Node_Str");
    httpService.registerServlet(INFO_SERVLET_PATH,new SupportServlet(new BUGSupportInfo(context),new SupportInfoXMLFormatter()),null,null);
    httpService.registerServlet(INFO_SERVLET_HTML_PATH,new SupportServlet(new BUGSupportInfo(context),new SupportInfoTextFormatter()),null,null);
    httpService.registerResources(ROOT_ALIAS,"String_Node_Str",new StaticResourceContext("String_Node_Str" + ROOT_ALIAS));
  }
 catch (  Exception e) {
    logService.log(LogService.LOG_ERROR,"String_Node_Str" + e.getMessage());
  }
}

Fixed version (ground truth):
@Override public void run(Map<String,Object> services){
  this.httpService=(HttpService)services.get(HttpService.class.getName());
  try {
    logService.log(LogService.LOG_INFO,"String_Node_Str");
    httpService.registerServlet(INFO_SERVLET_PATH,new SupportServlet(new BUGSupportInfo(context),new SupportInfoXMLFormatter()),null,null);
    httpService.registerServlet(INFO_SERVLET_HTML_PATH,new SupportServlet(new BUGSupportInfo(context),new SupportInfoTextFormatter()),null,null);
    httpService.registerResources(ROOT_ALIAS,"String_Node_Str",new StaticResourceContext("String_Node_Str" + ROOT_ALIAS));
  }
 catch (  Exception e) {
    logService.log(LogService.LOG_ERROR,"String_Node_Str" + e.getMessage());
  }
}