nus-yam/ex-repair huggingface dataset:
Program: 122431
Project: 122431
Buggy source:
/** 
 * get jobFolder, libFolder, batFile, shFile
 */
private void initJobFolder(){
  String tmpFoler=getTmpFolder();
  File tmpFile=new File(tmpFoler);
  File[] files=tmpFile.listFiles();
  File[] fs=files[0].listFiles();
  for (int i=0; fs != null && i < fs.length; i++) {
    if (fs[i].getName().equals(jobFolerName)) {
      jobFolder=fs[i];
      File[] fs1=jobFolder.listFiles();
      for (      File f : fs1) {
        if (f.getName().toLowerCase().endsWith("String_Node_Str")) {
          batFile=f;
        }
        if (f.getName().toLowerCase().endsWith("String_Node_Str")) {
          shFile=f;
        }
      }
    }
    if (fs[i].getName().equals(LIB)) {
      libFolder=fs[i];
    }
    if (fs[i].getName().equals(DRL)) {
      drlFolder=fs[i];
    }
    if (fs[i].getName().equals(XLS)) {
      xlsFolder=fs[i];
    }
  }
}

Fixed version (ground truth):
/** 
 * get jobFolder, libFolder, batFile, shFile
 */
private void initJobFolder(){
  String tmpFoler=getTmpFolder();
  File tmpFile=new File(tmpFoler);
  File[] files=tmpFile.listFiles();
  File[] fs=files[0].listFiles();
  for (int i=0; fs != null && i < fs.length; i++) {
    if (fs[i].getName().equals(jobFolerName)) {
      jobFolder=fs[i];
      File[] fs1=jobFolder.listFiles();
      for (      File f : fs1) {
        if (f.getName().toLowerCase().endsWith(FileConstants.BAT_FILE_SUFFIX)) {
          batFile=f;
        }
        if (f.getName().toLowerCase().endsWith(FileConstants.SH_FILE_SUFFIX)) {
          shFile=f;
        }
      }
    }
    if (fs[i].getName().equals(LIB)) {
      libFolder=fs[i];
    }
    if (fs[i].getName().equals(DRL)) {
      drlFolder=fs[i];
    }
    if (fs[i].getName().equals(XLS)) {
      xlsFolder=fs[i];
    }
  }
}
Program: 122432
Project: 122432
Buggy source:
private String[] getJobFolderJarFilenames(){
  File[] files=jobFolder.listFiles(new FilenameFilter(){
    public boolean accept(    File dir,    String name){
      return name.toLowerCase().endsWith("String_Node_Str") || name.toLowerCase().endsWith("String_Node_Str") ? true : false;
    }
  }
);
  String[] filenames=new String[files.length];
  for (int i=0; i < files.length; i++) {
    filenames[i]=files[i].getName();
  }
  return filenames;
}

Fixed version (ground truth):
private String[] getJobFolderJarFilenames(){
  File[] files=jobFolder.listFiles(new FilenameFilter(){
    public boolean accept(    File dir,    String name){
      return name.toLowerCase().endsWith(FileConstants.JAR_FILE_SUFFIX) || name.toLowerCase().endsWith(FileConstants.ZIP_FILE_SUFFIX) ? true : false;
    }
  }
);
  String[] filenames=new String[files.length];
  for (int i=0; i < files.length; i++) {
    filenames[i]=files[i].getName();
  }
  return filenames;
}
Program: 122433
Project: 122433
Buggy source:
public boolean accept(File dir,String name){
  return name.toLowerCase().endsWith("String_Node_Str") || name.toLowerCase().endsWith("String_Node_Str") ? true : false;
}

Fixed version (ground truth):
public boolean accept(File dir,String name){
  return name.toLowerCase().endsWith(FileConstants.JAR_FILE_SUFFIX) || name.toLowerCase().endsWith(FileConstants.ZIP_FILE_SUFFIX) ? true : false;
}
Program: 122434
Project: 122434
Buggy source:
private String[] getLibJarFilenames(){
  if (libFolder != null) {
    File[] files=libFolder.listFiles(new FilenameFilter(){
      public boolean accept(      File dir,      String name){
        return name.toLowerCase().endsWith("String_Node_Str") || name.toLowerCase().endsWith("String_Node_Str") ? true : false;
      }
    }
);
    String[] filenames=new String[files.length];
    for (int i=0; i < files.length; i++) {
      filenames[i]=files[i].getName();
    }
    return filenames;
  }
  return null;
}

Fixed version (ground truth):
private String[] getLibJarFilenames(){
  if (libFolder != null) {
    File[] files=libFolder.listFiles(new FilenameFilter(){
      public boolean accept(      File dir,      String name){
        return name.toLowerCase().endsWith(FileConstants.JAR_FILE_SUFFIX) || name.toLowerCase().endsWith(FileConstants.ZIP_FILE_SUFFIX) ? true : false;
      }
    }
);
    String[] filenames=new String[files.length];
    for (int i=0; i < files.length; i++) {
      filenames[i]=files[i].getName();
    }
    return filenames;
  }
  return null;
}
Program: 122435
Project: 122435
Buggy source:
public static void copyFile(String srcFileName,String desFileName,boolean delSrc) throws Exception {
  FileInputStream srcInputStream=new FileInputStream(srcFileName);
  long lastModified=new File(srcFileName).lastModified();
  int available=srcInputStream.available();
  if (available > L_SIZE) {
    copyFileL(srcFileName,srcInputStream,desFileName,delSrc);
  }
 else   if (available > M_SIZE) {
    copyFileM(srcFileName,srcInputStream,desFileName,delSrc);
  }
 else {
    copyFileS(srcFileName,srcInputStream,desFileName,delSrc);
  }
  new File(desFileName).setLastModified(lastModified);
}

Fixed version (ground truth):
public static void copyFile(String srcFileName,String desFileName,boolean delSrc) throws Exception {
  FileInputStream srcInputStream=null;
  try {
    srcInputStream=new FileInputStream(srcFileName);
    long lastModified=new File(srcFileName).lastModified();
    int available=srcInputStream.available();
    if (available > L_SIZE) {
      copyFileL(srcFileName,srcInputStream,desFileName,delSrc);
    }
 else     if (available > M_SIZE) {
      copyFileM(srcFileName,srcInputStream,desFileName,delSrc);
    }
 else {
      copyFileS(srcFileName,srcInputStream,desFileName,delSrc);
    }
    new File(desFileName).setLastModified(lastModified);
  }
  finally {
    if (srcInputStream != null) {
      srcInputStream.close();
    }
  }
}
Program: 122436
Project: 122436
Buggy source:
private static void copyFileM(String srcFileName,FileInputStream srcInputStream,String desFileName,boolean delSrc) throws IOException {
  File source=new File(srcFileName);
  File dest=new File(desFileName);
  FileChannel in=null;
  FileChannel out=null;
  try {
    in=srcInputStream.getChannel();
    out=new FileOutputStream(dest).getChannel();
    in.transferTo(0,in.size(),out);
    in.close();
    out.close();
    if (delSrc) {
      source.delete();
    }
  }
  finally {
    if (in != null) {
      in.close();
    }
    if (out != null) {
      out.close();
    }
  }
}

Fixed version (ground truth):
private static void copyFileM(String srcFileName,FileInputStream srcInputStream,String desFileName,boolean delSrc) throws IOException {
  File source=new File(srcFileName);
  File dest=new File(desFileName);
  FileChannel in=null;
  FileChannel out=null;
  try {
    in=srcInputStream.getChannel();
    out=new FileOutputStream(dest).getChannel();
    int maxCount=(32 * 1024 * 1024) - (28 * 1024);
    long size=in.size();
    long position=0;
    while (position < size) {
      position+=in.transferTo(position,maxCount,out);
    }
    in.close();
    out.close();
    if (delSrc) {
      source.delete();
    }
  }
  finally {
    if (in != null) {
      in.close();
    }
    if (out != null) {
      out.close();
    }
  }
}
Program: 122437
Project: 122437
Buggy source:
/** 
 * Sets the endConnection.
 * @param endConnection the endConnection to set
 */
public void setTargetConnection(ConnectionFigure targetConnection){
  if (targetConnection != null && targetConnection.getSourceAnchor() != null) {
    targetConnection.getSourceAnchor().removeAnchorListener(targetListener);
  }
  this.targetConnection=targetConnection;
  if (connection != null)   connection.disposeColors();
  connection=new ConnectionFigure(targetConnection.getConnection(),targetConnection.getConnectionProperty(),node);
  connection.setTargetDecoration(null);
  add(connection);
  if (dummy) {
    connection.setAlpha(255);
    connection.setVisible(true);
  }
 else {
    connection.setVisible(false);
  }
  targetDummy=connection;
  if (targetConnection.getSourceAnchor() != null && targetConnection.getSourceAnchor().getOwner() != null) {
    targetConnection.getSourceAnchor().addAnchorListener(targetListener);
  }
}

Fixed version (ground truth):
/** 
 * Sets the endConnection.
 * @param endConnection the endConnection to set
 */
public void setTargetConnection(ConnectionFigure targetConnection){
  if (targetConnection != null && targetConnection.getSourceAnchor() != null) {
    targetConnection.getSourceAnchor().removeAnchorListener(targetListener);
  }
  this.targetConnection=targetConnection;
  if (connection != null) {
    connection.disposeColors();
  }
  connection=new ConnectionFigure(targetConnection.getConnection(),targetConnection.getConnectionProperty(),node);
  connection.setTargetDecoration(null);
  add(connection);
  if (dummy) {
    connection.setAlpha(255);
    connection.setVisible(true);
  }
 else {
    connection.setVisible(false);
  }
  targetDummy=connection;
  if (targetConnection.getSourceAnchor() != null && targetConnection.getSourceAnchor().getOwner() != null) {
    targetConnection.getSourceAnchor().addAnchorListener(targetListener);
  }
}
Program: 122438
Project: 122438
Buggy source:
public void paint(IFigure figure,Graphics g,Insets theInsets){
  Rectangle r=getPaintRectangle(figure,theInsets);
  if (useRectangle) {
    g.setLineWidth(2);
    g.setForegroundColor(Display.getDefault().getSystemColor(SWT.COLOR_DARK_GRAY));
    g.drawRectangle(r);
    g.drawLine(r.x,1,r.right(),1);
    g.drawLine(1,r.y,1,r.bottom());
    g.setForegroundColor(Display.getDefault().getSystemColor(SWT.COLOR_GRAY));
    g.drawLine(r.x,r.bottom() - 1,r.right(),r.bottom() - 1);
    g.drawLine(r.right() - 1,r.y,r.right() - 1,r.bottom());
  }
}

Fixed version (ground truth):
@Override public void paint(IFigure figure,Graphics g,Insets theInsets){
  Rectangle r=getPaintRectangle(figure,theInsets);
  if (useRectangle) {
    g.setLineWidth(2);
    g.setForegroundColor(Display.getDefault().getSystemColor(SWT.COLOR_DARK_GRAY));
    g.drawRectangle(r);
    g.drawLine(r.x,1,r.right(),1);
    g.drawLine(1,r.y,1,r.bottom());
    g.setForegroundColor(Display.getDefault().getSystemColor(SWT.COLOR_GRAY));
    g.drawLine(r.x,r.bottom() - 1,r.right(),r.bottom() - 1);
    g.drawLine(r.right() - 1,r.y,r.right() - 1,r.bottom());
  }
}
Program: 122439
Project: 122439
Buggy source:
public void anchorMoved(ConnectionAnchor anchor){
  if (curConn != null) {
    updateSource(curConn);
  }
}

Fixed version (ground truth):
@Override public void anchorMoved(ConnectionAnchor anchor){
  if (curConn != null) {
    updateSource(curConn);
  }
}
Program: 122440
Project: 122440
Buggy source:
public Insets getInsets(IFigure figure){
  return null;
}

Fixed version (ground truth):
@Override public Insets getInsets(IFigure figure){
  return null;
}
Program: 122442
Project: 122442
Buggy source:
public void addSourceConnection(ConnectionFigure sourceConnection){
  if (!sourceDummyMap.keySet().contains(sourceConnection)) {
    if (connection != null)     connection.disposeColors();
    connection=new ConnectionFigure(sourceConnection.getConnection(),sourceConnection.getConnectionProperty(),node);
    connection.setTargetDecoration(null);
    add(connection);
    if (dummy) {
      connection.setAlpha(255);
      connection.setVisible(true);
    }
 else {
      connection.setVisible(false);
    }
    this.sourceDummyMap.put(sourceConnection,connection);
    newSourceConnections.add(sourceConnection);
  }
}

Fixed version (ground truth):
public void addSourceConnection(ConnectionFigure sourceConnection){
  if (!sourceDummyMap.keySet().contains(sourceConnection)) {
    if (connection != null) {
      connection.disposeColors();
    }
    connection=new ConnectionFigure(sourceConnection.getConnection(),sourceConnection.getConnectionProperty(),node);
    connection.setTargetDecoration(null);
    add(connection);
    if (dummy) {
      connection.setAlpha(255);
      connection.setVisible(true);
    }
 else {
      connection.setVisible(false);
    }
    this.sourceDummyMap.put(sourceConnection,connection);
    newSourceConnections.add(sourceConnection);
  }
}
Program: 122443
Project: 122443
Buggy source:
public void disposeColors(){
  if (connection != null) {
    ResourceDisposeUtil.disposeColor(connection.getBackgroundColor());
    ResourceDisposeUtil.disposeColor(connection.getForegroundColor());
  }
  if (targetConnection != null)   targetConnection.disposeColors();
  if (targetDummy != null)   targetDummy.disposeColors();
}

Fixed version (ground truth):
public void disposeColors(){
  if (connection != null) {
    ResourceDisposeUtil.disposeColor(connection.getBackgroundColor());
    ResourceDisposeUtil.disposeColor(connection.getForegroundColor());
  }
  if (targetConnection != null) {
    targetConnection.disposeColors();
  }
  if (targetDummy != null) {
    targetDummy.disposeColors();
  }
}
Program: 122444
Project: 122444
Buggy source:
@Override protected void refreshTargetConnections(){
  int i;
  ConnectionEditPart editPart;
  Object model;
  Map mapModelToEditPart=new HashMap();
  List connections=getTargetConnections();
  for (i=0; i < connections.size(); i++) {
    editPart=(ConnectionEditPart)connections.get(i);
    mapModelToEditPart.put(editPart.getModel(),editPart);
  }
  List modelObjects=getModelTargetConnections();
  if (modelObjects == null)   modelObjects=new ArrayList();
  for (i=0; i < modelObjects.size(); i++) {
    model=modelObjects.get(i);
    if (model instanceof IConnection) {
      INode sourcenode=((IConnection)model).getSource();
      INode targetnode=((IConnection)model).getSource();
      String connectorName=((IConnection)model).getConnectorName();
      if (sourcenode.getConnectorFromName(connectorName) == null && targetnode.getConnectorFromName(connectorName) == null) {
        return;
      }
    }
    if (i < connections.size() && ((EditPart)connections.get(i)).getModel() == model)     continue;
    editPart=(ConnectionEditPart)mapModelToEditPart.get(model);
    if (editPart != null)     reorderTargetConnection(editPart,i);
 else {
      editPart=createOrFindConnection(model);
      addTargetConnection(editPart,i);
    }
  }
  List trash=new ArrayList();
  for (; i < connections.size(); i++)   trash.add(connections.get(i));
  for (i=0; i < trash.size(); i++)   removeTargetConnection((ConnectionEditPart)trash.get(i));
}

Fixed version (ground truth):
@Override protected void refreshTargetConnections(){
  int i;
  ConnectionEditPart editPart;
  Object model;
  Map mapModelToEditPart=new HashMap();
  List connections=getTargetConnections();
  for (i=0; i < connections.size(); i++) {
    editPart=(ConnectionEditPart)connections.get(i);
    mapModelToEditPart.put(editPart.getModel(),editPart);
  }
  List modelObjects=getModelTargetConnections();
  if (modelObjects == null) {
    modelObjects=new ArrayList();
  }
  for (i=0; i < modelObjects.size(); i++) {
    model=modelObjects.get(i);
    if (model instanceof IConnection) {
      INode sourcenode=((IConnection)model).getSource();
      INode targetnode=((IConnection)model).getSource();
      String connectorName=((IConnection)model).getConnectorName();
      if (sourcenode.getConnectorFromName(connectorName) == null && targetnode.getConnectorFromName(connectorName) == null) {
        return;
      }
    }
    if (i < connections.size() && ((EditPart)connections.get(i)).getModel() == model) {
      continue;
    }
    editPart=(ConnectionEditPart)mapModelToEditPart.get(model);
    if (editPart != null) {
      reorderTargetConnection(editPart,i);
    }
 else {
      editPart=createOrFindConnection(model);
      addTargetConnection(editPart,i);
    }
  }
  List trash=new ArrayList();
  for (; i < connections.size(); i++) {
    trash.add(connections.get(i));
  }
  for (i=0; i < trash.size(); i++) {
    removeTargetConnection((ConnectionEditPart)trash.get(i));
  }
}
Program: 122446
Project: 122446
Buggy source:
@Override protected void unregisterVisuals(){
  if (((NodeFigure)getFigure()).connection != null)   ((NodeFigure)getFigure()).connection.disposeColors();
  if (getRoot() != null) {
    super.unregisterVisuals();
  }
}

Fixed version (ground truth):
@Override protected void unregisterVisuals(){
  if (((NodeFigure)getFigure()).connection != null) {
    ((NodeFigure)getFigure()).connection.disposeColors();
  }
  if (getRoot() != null) {
    super.unregisterVisuals();
  }
}
Program: 122448
Project: 122448
Buggy source:
public ConnectionAnchor getTargetConnectionAnchor(final Request request){
  return new ChopboxAnchor(getFigure());
}

Fixed version (ground truth):
@Override public ConnectionAnchor getTargetConnectionAnchor(final Request request){
  return new ChopboxAnchor(getFigure());
}
Program: 122450
Project: 122450
Buggy source:
@Override protected void refreshSourceConnections(){
  int i;
  ConnectionEditPart editPart;
  Object model;
  Map modelToEditPart=new HashMap();
  List editParts=getSourceConnections();
  for (i=0; i < editParts.size(); i++) {
    editPart=(ConnectionEditPart)editParts.get(i);
    modelToEditPart.put(editPart.getModel(),editPart);
  }
  List modelObjects=getModelSourceConnections();
  if (modelObjects == null)   modelObjects=new ArrayList();
  for (i=0; i < modelObjects.size(); i++) {
    model=modelObjects.get(i);
    if (model instanceof IConnection) {
      INode sourcenode=((IConnection)model).getSource();
      INode targetnode=((IConnection)model).getSource();
      String connectorName=((IConnection)model).getConnectorName();
      if (sourcenode.getConnectorFromName(connectorName) == null && targetnode.getConnectorFromName(connectorName) == null) {
        return;
      }
    }
    if (i < editParts.size() && ((EditPart)editParts.get(i)).getModel() == model)     continue;
    editPart=(ConnectionEditPart)modelToEditPart.get(model);
    if (editPart != null)     reorderSourceConnection(editPart,i);
 else {
      editPart=createOrFindConnection(model);
      addSourceConnection(editPart,i);
    }
  }
  List trash=new ArrayList();
  for (; i < editParts.size(); i++)   trash.add(editParts.get(i));
  for (i=0; i < trash.size(); i++)   removeSourceConnection((ConnectionEditPart)trash.get(i));
}

Fixed version (ground truth):
@Override protected void refreshSourceConnections(){
  int i;
  ConnectionEditPart editPart;
  Object model;
  Map modelToEditPart=new HashMap();
  List editParts=getSourceConnections();
  for (i=0; i < editParts.size(); i++) {
    editPart=(ConnectionEditPart)editParts.get(i);
    modelToEditPart.put(editPart.getModel(),editPart);
  }
  List modelObjects=getModelSourceConnections();
  if (modelObjects == null) {
    modelObjects=new ArrayList();
  }
  for (i=0; i < modelObjects.size(); i++) {
    model=modelObjects.get(i);
    if (model instanceof IConnection) {
      INode sourcenode=((IConnection)model).getSource();
      INode targetnode=((IConnection)model).getSource();
      String connectorName=((IConnection)model).getConnectorName();
      if (sourcenode.getConnectorFromName(connectorName) == null && targetnode.getConnectorFromName(connectorName) == null) {
        return;
      }
    }
    if (i < editParts.size() && ((EditPart)editParts.get(i)).getModel() == model) {
      continue;
    }
    editPart=(ConnectionEditPart)modelToEditPart.get(model);
    if (editPart != null) {
      reorderSourceConnection(editPart,i);
    }
 else {
      editPart=createOrFindConnection(model);
      addSourceConnection(editPart,i);
    }
  }
  List trash=new ArrayList();
  for (; i < editParts.size(); i++) {
    trash.add(editParts.get(i));
  }
  for (i=0; i < trash.size(); i++) {
    removeSourceConnection((ConnectionEditPart)trash.get(i));
  }
}
Program: 122451
Project: 122451
Buggy source:
public ConnectionAnchor getSourceConnectionAnchor(final Request request){
  return new ChopboxAnchor(getFigure());
}

Fixed version (ground truth):
@Override public ConnectionAnchor getSourceConnectionAnchor(final Request request){
  return new ChopboxAnchor(getFigure());
}
Program: 122452
Project: 122452
Buggy source:
private static void copyFileM(String srcFileName,FileInputStream srcInputStream,String desFileName,boolean delSrc) throws IOException {
  File source=new File(srcFileName);
  File dest=new File(desFileName);
  FileChannel in=null;
  FileChannel out=null;
  try {
    in=srcInputStream.getChannel();
    out=new FileOutputStream(dest).getChannel();
    in.transferTo(0,in.size(),out);
    in.close();
    out.close();
    if (delSrc) {
      source.delete();
    }
  }
  finally {
    if (in != null) {
      in.close();
    }
    if (out != null) {
      out.close();
    }
  }
}

Fixed version (ground truth):
private static void copyFileM(String srcFileName,FileInputStream srcInputStream,String desFileName,boolean delSrc) throws IOException {
  File source=new File(srcFileName);
  File dest=new File(desFileName);
  FileChannel in=null;
  FileChannel out=null;
  try {
    in=srcInputStream.getChannel();
    out=new FileOutputStream(dest).getChannel();
    int maxCount=(32 * 1024 * 1024) - (28 * 1024);
    long size=in.size();
    long position=0;
    while (position < size) {
      position+=in.transferTo(position,maxCount,out);
    }
    in.close();
    out.close();
    if (delSrc) {
      source.delete();
    }
  }
  finally {
    if (in != null) {
      in.close();
    }
    if (out != null) {
      out.close();
    }
  }
}
Program: 122454
Project: 122454
Buggy source:
/** 
 * Parse the XML file. Buffer the result in LoopEntry.
 * @param is InputStream
 */
public void parse(java.io.InputStream is,String charset){
  this.charset=charset;
  try {
    DefaultHandler hd=null;
    SAXParser saxParser=SAXParserFactory.newInstance().newSAXParser();
    if (rootPath == null || rootPath.equals("String_Node_Str")) {
      hd=newHandler();
    }
 else {
      hd=newHandler2();
    }
    saxParser.setProperty("String_Node_Str",hd);
    org.xml.sax.InputSource inSource=new org.xml.sax.InputSource(new UnicodeReader(is,this.charset));
    saxParser.parse(is,hd);
  }
 catch (  ParserConfigurationException e) {
    e.printStackTrace();
  }
catch (  SAXException e) {
    e.printStackTrace();
  }
catch (  IOException e) {
    e.printStackTrace();
  }
}

Fixed version (ground truth):
/** 
 * Parse the XML file. Buffer the result in LoopEntry.
 * @param is InputStream
 */
public void parse(java.io.InputStream is,String charset){
  this.charset=charset;
  Reader reader=null;
  try {
    DefaultHandler hd=null;
    SAXParser saxParser=SAXParserFactory.newInstance().newSAXParser();
    if (rootPath == null || rootPath.equals("String_Node_Str")) {
      hd=newHandler();
    }
 else {
      hd=newHandler2();
    }
    saxParser.setProperty("String_Node_Str",hd);
    reader=new UnicodeReader(is,this.charset);
    org.xml.sax.InputSource inSource=new org.xml.sax.InputSource(reader);
    saxParser.parse(inSource,hd);
  }
 catch (  ParserConfigurationException e) {
    e.printStackTrace();
  }
catch (  SAXException e) {
    e.printStackTrace();
  }
catch (  IOException e) {
    e.printStackTrace();
  }
 finally {
    if (reader != null) {
      try {
        reader.close();
      }
 catch (      IOException e) {
        e.printStackTrace();
      }
    }
  }
}
Program: 122455
Project: 122455
Buggy source:
public Object call() throws Exception {
  try {
    DefaultHandler hd=new SimpleSAXLoopHandler(nodes,bcache);
    SAXParser saxParser=null;
    if (!ignoreDTD) {
      saxParser=SAXParserFactory.newInstance().newSAXParser();
    }
 else {
      SAXParserFactory spf=SAXParserFactory.newInstance();
      spf.setFeature("String_Node_Str",false);
      saxParser=spf.newSAXParser();
    }
    saxParser.setProperty("String_Node_Str",hd);
    if (fileURL != null) {
      org.xml.sax.InputSource inSource=new org.xml.sax.InputSource(new UnicodeReader(new java.io.FileInputStream(fileURL),this.charset));
      saxParser.parse(inSource,hd);
    }
 else {
      org.xml.sax.InputSource inSource=new org.xml.sax.InputSource(new UnicodeReader(is,this.charset));
      saxParser.parse(is,hd);
    }
  }
  finally {
    bcache.notifyErrorOccurred();
  }
  return null;
}

Fixed version (ground truth):
public Object call() throws Exception {
  Reader reader=null;
  try {
    DefaultHandler hd=new SimpleSAXLoopHandler(nodes,bcache);
    SAXParser saxParser=null;
    if (!ignoreDTD) {
      saxParser=SAXParserFactory.newInstance().newSAXParser();
    }
 else {
      SAXParserFactory spf=SAXParserFactory.newInstance();
      spf.setFeature("String_Node_Str",false);
      saxParser=spf.newSAXParser();
    }
    saxParser.setProperty("String_Node_Str",hd);
    if (fileURL != null) {
      reader=new UnicodeReader(new java.io.FileInputStream(fileURL),this.charset);
      org.xml.sax.InputSource inSource=new org.xml.sax.InputSource(reader);
      saxParser.parse(inSource,hd);
    }
 else {
      reader=new UnicodeReader(is,this.charset);
      org.xml.sax.InputSource inSource=new org.xml.sax.InputSource(reader);
      saxParser.parse(inSource,hd);
    }
  }
  finally {
    try {
      if (reader != null) {
        reader.close();
      }
    }
  finally {
      bcache.notifyErrorOccurred();
    }
  }
  return null;
}
Program: 122456
Project: 122456
Buggy source:
private Command getChangePropertyCommand(RepositoryNode selectedNode,Node node,ConnectionItem connectionItem){
  ERepositoryObjectType selectedNodetype=selectedNode.getObjectType();
  EDatabaseComponentName name=EDatabaseComponentName.getCorrespondingComponentName(connectionItem,selectedNodetype);
  if (name != null) {
    List<String> componentNameList=new ArrayList<String>();
    componentNameList.add(name.getInputComponentName());
    componentNameList.add(name.getOutPutComponentName());
    String nodeComponentName=node.getComponent().getName();
    if (componentNameList.contains(nodeComponentName)) {
      IElementParameter param=node.getElementParameterFromField(EParameterFieldType.PROPERTY_TYPE);
      if (param != null) {
        return getPropertyPublicPart(selectedNode,param,node,connectionItem);
      }
    }
  }
  return null;
}

Fixed version (ground truth):
private Command getChangePropertyCommand(RepositoryNode selectedNode,Node node,ConnectionItem connectionItem){
  ERepositoryObjectType selectedNodeType=selectedNode.getObjectType();
  IComponentName rcSetting=RepositoryComponentManager.getSetting(connectionItem,selectedNodeType);
  if (rcSetting == null) {
    for (    IDragAndDropServiceHandler handler : DragAndDropManager.getHandlers()) {
      rcSetting=handler.getCorrespondingComponentName(connectionItem,selectedNodeType);
      if (rcSetting != null) {
        break;
      }
    }
    if (rcSetting == null) {
      return null;
    }
  }
  List<IComponent> neededComponents=RepositoryComponentManager.filterNeededComponents(connectionItem,selectedNode,selectedNodeType);
  for (  IDragAndDropServiceHandler handler : DragAndDropManager.getHandlers()) {
    List<IComponent> comList=handler.filterNeededComponents(connectionItem,selectedNode,selectedNodeType);
    if (comList != null) {
      for (      IComponent handlerComp : comList) {
        if (!neededComponents.contains(handlerComp)) {
          neededComponents.add(handlerComp);
        }
      }
    }
  }
  List<String> componentNameList=new ArrayList<String>();
  for (  IComponent component : neededComponents) {
    componentNameList.add(component.getName());
  }
  String nodeComponentName=node.getComponent().getName();
  if (componentNameList.contains(nodeComponentName)) {
    IElementParameter param=node.getElementParameterFromField(EParameterFieldType.PROPERTY_TYPE);
    if (param != null) {
      return getPropertyPublicPart(selectedNode,param,node,connectionItem);
    }
  }
  return null;
}
Program: 122458
Project: 122458
Buggy source:
/** 
 * Parse the XML file. Buffer the result in LoopEntry.
 * @param is InputStream
 */
public void parse(java.io.InputStream is,String charset){
  this.charset=charset;
  try {
    DefaultHandler hd=null;
    SAXParser saxParser=SAXParserFactory.newInstance().newSAXParser();
    if (rootPath == null || rootPath.equals("String_Node_Str")) {
      hd=newHandler();
    }
 else {
      hd=newHandler2();
    }
    saxParser.setProperty("String_Node_Str",hd);
    org.xml.sax.InputSource inSource=new org.xml.sax.InputSource(new UnicodeReader(is,this.charset));
    saxParser.parse(is,hd);
  }
 catch (  ParserConfigurationException e) {
    e.printStackTrace();
  }
catch (  SAXException e) {
    e.printStackTrace();
  }
catch (  IOException e) {
    e.printStackTrace();
  }
}

Fixed version (ground truth):
/** 
 * Parse the XML file. Buffer the result in LoopEntry.
 * @param is InputStream
 */
public void parse(java.io.InputStream is,String charset){
  this.charset=charset;
  Reader reader=null;
  try {
    DefaultHandler hd=null;
    SAXParser saxParser=SAXParserFactory.newInstance().newSAXParser();
    if (rootPath == null || rootPath.equals("String_Node_Str")) {
      hd=newHandler();
    }
 else {
      hd=newHandler2();
    }
    saxParser.setProperty("String_Node_Str",hd);
    reader=new UnicodeReader(is,this.charset);
    org.xml.sax.InputSource inSource=new org.xml.sax.InputSource(reader);
    saxParser.parse(inSource,hd);
  }
 catch (  ParserConfigurationException e) {
    e.printStackTrace();
  }
catch (  SAXException e) {
    e.printStackTrace();
  }
catch (  IOException e) {
    e.printStackTrace();
  }
 finally {
    if (reader != null) {
      try {
        reader.close();
      }
 catch (      IOException e) {
        e.printStackTrace();
      }
    }
  }
}
Program: 122459
Project: 122459
Buggy source:
public Object call() throws Exception {
  try {
    DefaultHandler hd=new SimpleSAXLoopHandler(nodes,bcache);
    SAXParser saxParser=null;
    if (!ignoreDTD) {
      saxParser=SAXParserFactory.newInstance().newSAXParser();
    }
 else {
      SAXParserFactory spf=SAXParserFactory.newInstance();
      spf.setFeature("String_Node_Str",false);
      saxParser=spf.newSAXParser();
    }
    saxParser.setProperty("String_Node_Str",hd);
    if (fileURL != null) {
      org.xml.sax.InputSource inSource=new org.xml.sax.InputSource(new UnicodeReader(new java.io.FileInputStream(fileURL),this.charset));
      saxParser.parse(inSource,hd);
    }
 else {
      org.xml.sax.InputSource inSource=new org.xml.sax.InputSource(new UnicodeReader(is,this.charset));
      saxParser.parse(is,hd);
    }
  }
  finally {
    bcache.notifyErrorOccurred();
  }
  return null;
}

Fixed version (ground truth):
public Object call() throws Exception {
  Reader reader=null;
  try {
    DefaultHandler hd=new SimpleSAXLoopHandler(nodes,bcache);
    SAXParser saxParser=null;
    if (!ignoreDTD) {
      saxParser=SAXParserFactory.newInstance().newSAXParser();
    }
 else {
      SAXParserFactory spf=SAXParserFactory.newInstance();
      spf.setFeature("String_Node_Str",false);
      saxParser=spf.newSAXParser();
    }
    saxParser.setProperty("String_Node_Str",hd);
    if (fileURL != null) {
      reader=new UnicodeReader(new java.io.FileInputStream(fileURL),this.charset);
      org.xml.sax.InputSource inSource=new org.xml.sax.InputSource(reader);
      saxParser.parse(inSource,hd);
    }
 else {
      reader=new UnicodeReader(is,this.charset);
      org.xml.sax.InputSource inSource=new org.xml.sax.InputSource(reader);
      saxParser.parse(inSource,hd);
    }
  }
  finally {
    try {
      if (reader != null) {
        reader.close();
      }
    }
  finally {
      bcache.notifyErrorOccurred();
    }
  }
  return null;
}
Program: 122460
Project: 122460
Buggy source:
public boolean select(Viewer viewer,Object parentElement,Object element){
  PaletteEntry entry=(PaletteEntry)element;
  if (entry instanceof PaletteContainer) {
    return isFolderVisible((PaletteContainer)entry,isVisible);
  }
  if (isVisible) {
    return isComponentVisible(entry);
  }
 else {
    return !isComponentVisible(entry);
  }
}

Fixed version (ground truth):
@Override public boolean select(Viewer viewer,Object parentElement,Object element){
  PaletteEntry entry=(PaletteEntry)element;
  if (entry instanceof PaletteContainer) {
    return isFolderVisible((PaletteContainer)entry,isVisible);
  }
  if (isVisible) {
    return isComponentVisible(entry);
  }
 else {
    return !isComponentVisible(entry);
  }
}
Program: 122461
Project: 122461
Buggy source:
public void widgetSelected(SelectionEvent e){
  setComponentVisible(displayViewer.getSelection(),false);
  setValid(true);
}

Fixed version (ground truth):
@Override public void widgetSelected(SelectionEvent e){
  setComponentVisible(displayViewer.getSelection(),false);
  setValid(true);
}
Program: 122462
Project: 122462
Buggy source:
/** 
 * DOC qwei Comment method "getFilterForHiddenComponent". isVisible false for left viewer; true for right viewer
 * @return
 */
private ViewerFilter getFilterForComponent(final boolean isVisible){
  ViewerFilter filter=new ViewerFilter(){
    public boolean select(    Viewer viewer,    Object parentElement,    Object element){
      PaletteEntry entry=(PaletteEntry)element;
      if (entry instanceof PaletteContainer) {
        return isFolderVisible((PaletteContainer)entry,isVisible);
      }
      if (isVisible) {
        return isComponentVisible(entry);
      }
 else {
        return !isComponentVisible(entry);
      }
    }
  }
;
  return filter;
}

Fixed version (ground truth):
/** 
 * DOC qwei Comment method "getFilterForHiddenComponent". isVisible false for left viewer; true for right viewer
 * @return
 */
private ViewerFilter getFilterForComponent(final boolean isVisible){
  ViewerFilter filter=new ViewerFilter(){
    @Override public boolean select(    Viewer viewer,    Object parentElement,    Object element){
      PaletteEntry entry=(PaletteEntry)element;
      if (entry instanceof PaletteContainer) {
        return isFolderVisible((PaletteContainer)entry,isVisible);
      }
      if (isVisible) {
        return isComponentVisible(entry);
      }
 else {
        return !isComponentVisible(entry);
      }
    }
  }
;
  return filter;
}
Program: 122464
Project: 122464
Buggy source:
protected void okPressed(){
  IProxyRepositoryFactory prf=CorePlugin.getDefault().getProxyRepositoryFactory();
  try {
    prf.saveProject(project);
    ShowStandardAction.getInstance().doRun();
    if (needCodeGen) {
      IComponentsFactory components=ComponentsFactoryProvider.getInstance();
      CorePlugin.getDefault().getCodeGeneratorService().refreshTemplates();
      CorePlugin.getDefault().getLibrariesService().resetModulesNeeded();
    }
  }
 catch (  Exception ex) {
    ExceptionHandler.process(ex);
  }
}

Fixed version (ground truth):
protected void okPressed(){
  IProxyRepositoryFactory prf=CorePlugin.getDefault().getProxyRepositoryFactory();
  try {
    prf.saveProject(project);
    ShowStandardAction.getInstance().doRun();
    if (needCodeGen) {
      IComponentsFactory components=ComponentsFactoryProvider.getInstance();
      Job refreshTemplates=CorePlugin.getDefault().getCodeGeneratorService().refreshTemplates();
      refreshTemplates.addJobChangeListener(new JobChangeAdapter(){
        @Override public void done(        IJobChangeEvent event){
          CorePlugin.getDefault().getLibrariesService().resetModulesNeeded();
        }
      }
);
    }
  }
 catch (  Exception ex) {
    ExceptionHandler.process(ex);
  }
}
Program: 122465
Project: 122465
Buggy source:
@SuppressWarnings("String_Node_Str") public List<ComponentSetting> getComponentsFromProject(Project project){
  List<ComponentSetting> components=(List<ComponentSetting>)project.getEmfProject().getComponentsSettings();
  return components;
}

Fixed version (ground truth):
@SuppressWarnings("String_Node_Str") public List<ComponentSetting> getComponentsFromProject(Project project){
  List<ComponentSetting> components=project.getEmfProject().getComponentsSettings();
  return components;
}
Program: 122466
Project: 122466
Buggy source:
protected void cancelPressed(){
  for (Iterator iterator=statusBackup.keySet().iterator(); iterator.hasNext(); ) {
    String name=(String)iterator.next();
    setComponentVisibleForRestore(name,statusBackup.get(name));
  }
}

Fixed version (ground truth):
protected void cancelPressed(){
  for (  Object element : statusBackup.keySet()) {
    String name=(String)element;
    setComponentVisibleForRestore(name,statusBackup.get(name));
  }
}
Program: 122471
Project: 122471
Buggy source:
public String getFamilyTranslation(Object component,String text){
  String translated=Messages.getString(text);
  if (translated.startsWith("String_Node_Str")) {
    if (component instanceof IComponent) {
      if (componentToProviderMap.containsKey(component)) {
        String translatedFromProvider=componentToProviderMap.get(component).getFamilyTranslation(text);
        if (translatedFromProvider != null) {
          translated=translatedFromProvider;
        }
      }
    }
 else     if (component instanceof String) {
      if (componentsAndProvider.containsKey(component)) {
        String translatedFromProvider=componentsAndProvider.get(component).getFamilyTranslation(text);
        if (translatedFromProvider != null) {
          translated=translatedFromProvider;
        }
      }
    }
  }
  return translated;
}

Fixed version (ground truth):
@Override public String getFamilyTranslation(Object component,String text){
  String translated=Messages.getString(text);
  if (translated.startsWith("String_Node_Str")) {
    if (component instanceof IComponent) {
      if (componentToProviderMap.containsKey(component)) {
        String translatedFromProvider=componentToProviderMap.get(component).getFamilyTranslation(text);
        if (translatedFromProvider != null) {
          translated=translatedFromProvider;
        }
      }
    }
 else     if (component instanceof String) {
      if (componentsAndProvider.containsKey(component)) {
        String translatedFromProvider=componentsAndProvider.get(component).getFamilyTranslation(text);
        if (translatedFromProvider != null) {
          translated=translatedFromProvider;
        }
      }
    }
  }
  return translated;
}
Program: 122472
Project: 122472
Buggy source:
public List<IComponent> getCustomComponents(){
  if (customComponentList == null) {
    init(false);
  }
  return customComponentList;
}

Fixed version (ground truth):
@Override public List<IComponent> getCustomComponents(){
  if (customComponentList == null) {
    init(false);
  }
  return customComponentList;
}
Program: 122473
Project: 122473
Buggy source:
public void error(final SAXParseException exception) throws SAXException {
  throw exception;
}

Fixed version (ground truth):
@Override public void error(final SAXParseException exception) throws SAXException {
  throw exception;
}
Program: 122474
Project: 122474
Buggy source:
public void resetSpecificComponents(){
  loadComponentsFromExtensions();
}

Fixed version (ground truth):
@Override public void resetSpecificComponents(){
  loadComponentsFromExtensions();
}
Program: 122475
Project: 122475
Buggy source:
public IComponent get(String name){
  if (componentList == null) {
    init(false);
  }
  for (  IComponent comp : componentList) {
    if (comp != null && comp.getName().equals(name)) {
      return comp;
    }
  }
  return null;
}

Fixed version (ground truth):
@Override public IComponent get(String name){
  if (componentList == null) {
    init(false);
  }
  for (  IComponent comp : componentList) {
    if (comp != null && comp.getName().equals(name)) {
      return comp;
    }
  }
  return null;
}
Program: 122476
Project: 122476
Buggy source:
public Set<IComponent> getComponents(){
  if (componentList == null) {
    init(false);
  }
  return componentList;
}

Fixed version (ground truth):
@Override public Set<IComponent> getComponents(){
  if (componentList == null) {
    init(false);
  }
  return componentList;
}
Program: 122477
Project: 122477
Buggy source:
public void warning(final SAXParseException exception) throws SAXException {
  throw exception;
}

Fixed version (ground truth):
@Override public void warning(final SAXParseException exception) throws SAXException {
  throw exception;
}
Program: 122478
Project: 122478
Buggy source:
private boolean isHiddenInRefProjects(ComponentSetting settingInMain){
  if (settingInMain == null) {
    return false;
  }
  int hiddenCount=0;
  ProjectManager manager=ProjectManager.getInstance();
  List<Project> referencedProjects=manager.getReferencedProjects();
  for (  Project curProject : referencedProjects) {
    List<ComponentSetting> componentsSettings=(List<ComponentSetting>)curProject.getEmfProject().getComponentsSettings();
    for (    ComponentSetting setting : componentsSettings) {
      if (setting.isHidden() && setting.getName().equals(settingInMain.getName()) && setting.getFamily().equals(settingInMain.getFamily())) {
        hiddenCount++;
      }
    }
  }
  if (hiddenCount == referencedProjects.size()) {
    return true;
  }
  return false;
}

Fixed version (ground truth):
private boolean isHiddenInRefProjects(ComponentSetting settingInMain){
  if (settingInMain == null) {
    return false;
  }
  int hiddenCount=0;
  ProjectManager manager=ProjectManager.getInstance();
  List<Project> referencedProjects=manager.getReferencedProjects();
  for (  Project curProject : referencedProjects) {
    List<ComponentSetting> componentsSettings=curProject.getEmfProject().getComponentsSettings();
    for (    ComponentSetting setting : componentsSettings) {
      if (setting.isHidden() && setting.getName().equals(settingInMain.getName()) && setting.getFamily().equals(settingInMain.getFamily())) {
        hiddenCount++;
      }
    }
  }
  if (hiddenCount == referencedProjects.size()) {
    return true;
  }
  return false;
}
Program: 122479
Project: 122479
Buggy source:
public Map<String,ImageDescriptor> getComponentsImageRegistry(){
  return componentsImageRegistry;
}

Fixed version (ground truth):
@Override public Map<String,ImageDescriptor> getComponentsImageRegistry(){
  return componentsImageRegistry;
}
Program: 122480
Project: 122480
Buggy source:
public URL getComponentPath() throws IOException {
  String componentsPath=IComponentsFactory.COMPONENTS_LOCATION;
  IBrandingService breaningService=(IBrandingService)GlobalServiceRegister.getDefault().getService(IBrandingService.class);
  if (breaningService.isPoweredOnlyCamel()) {
    componentsPath=IComponentsFactory.CAMEL_COMPONENTS_LOCATION;
  }
  Bundle b=Platform.getBundle(componentsPath);
  URL url=FileLocator.toFileURL(FileLocator.find(b,new Path(IComponentsFactory.COMPONENTS_INNER_FOLDER),null));
  return url;
}

Fixed version (ground truth):
@Override public URL getComponentPath() throws IOException {
  String componentsPath=IComponentsFactory.COMPONENTS_LOCATION;
  IBrandingService breaningService=(IBrandingService)GlobalServiceRegister.getDefault().getService(IBrandingService.class);
  if (breaningService.isPoweredOnlyCamel()) {
    componentsPath=IComponentsFactory.CAMEL_COMPONENTS_LOCATION;
  }
  Bundle b=Platform.getBundle(componentsPath);
  URL url=FileLocator.toFileURL(FileLocator.find(b,new Path(IComponentsFactory.COMPONENTS_INNER_FOLDER),null));
  return url;
}
Program: 122481
Project: 122481
Buggy source:
public void fatalError(final SAXParseException exception) throws SAXException {
  throw exception;
}

Fixed version (ground truth):
@Override public void fatalError(final SAXParseException exception) throws SAXException {
  throw exception;
}
Program: 122482
Project: 122482
Buggy source:
private List<ComponentSetting> getComponentsFromProject(){
  Project currentProject=ProjectManager.getInstance().getCurrentProject();
  if (currentProject != null && currentProject.getEmfProject() != null) {
    List<ComponentSetting> components=(List<ComponentSetting>)currentProject.getEmfProject().getComponentsSettings();
    return components;
  }
  return Collections.emptyList();
}

Fixed version (ground truth):
private List<ComponentSetting> getComponentsFromProject(){
  Project currentProject=ProjectManager.getInstance().getCurrentProject();
  if (currentProject != null && currentProject.getEmfProject() != null) {
    List<ComponentSetting> components=currentProject.getEmfProject().getComponentsSettings();
    return components;
  }
  return Collections.emptyList();
}
Program: 122483
Project: 122483
Buggy source:
public boolean accept(final File file){
  return file.isDirectory() && file.getName().charAt(0) != '.' && !file.getName().equals(IComponentsFactory.EXTERNAL_COMPONENTS_INNER_FOLDER);
}

Fixed version (ground truth):
@Override public boolean accept(final File file){
  return file.isDirectory() && file.getName().charAt(0) != '.' && !file.getName().equals(IComponentsFactory.EXTERNAL_COMPONENTS_INNER_FOLDER);
}
Program: 122484
Project: 122484
Buggy source:
public void loadUserComponentsFromComponentsProviderExtension(){
  ComponentsProviderManager.getInstance().getProviders();
  ComponentsProviderManager componentsProviderManager=ComponentsProviderManager.getInstance();
  AbstractComponentsProvider componentsProvider=componentsProviderManager.loadUserComponentsProvidersFromExtension();
  if (this.userComponentList != null) {
    ComponentsCache cache=ComponentManager.getInstance();
    for (    IComponent component : userComponentList) {
      if (componentList != null && componentList.contains(component)) {
        componentList.remove(component);
      }
      if (customComponentList.contains(component)) {
        customComponentList.remove(component);
      }
      if (cache.getComponentEntryMap().get(component.getName()) != null) {
        cache.getComponentEntryMap().remove(component.getName());
      }
    }
  }
  loadComponents(componentsProvider);
  if (!CommonsPlugin.isHeadless()) {
    ComponentManager.saveResource();
  }
}

Fixed version (ground truth):
@Override public void loadUserComponentsFromComponentsProviderExtension(){
  ComponentsProviderManager.getInstance().getProviders();
  ComponentsProviderManager componentsProviderManager=ComponentsProviderManager.getInstance();
  AbstractComponentsProvider componentsProvider=componentsProviderManager.loadUserComponentsProvidersFromExtension();
  if (this.userComponentList != null) {
    ComponentsCache cache=ComponentManager.getInstance();
    for (    IComponent component : userComponentList) {
      if (componentList != null && componentList.contains(component)) {
        componentList.remove(component);
      }
      if (customComponentList.contains(component)) {
        customComponentList.remove(component);
      }
      if (cache.getComponentEntryMap().get(component.getName()) != null) {
        cache.getComponentEntryMap().remove(component.getName());
      }
    }
  }
  loadComponents(componentsProvider);
  if (!CommonsPlugin.isHeadless()) {
    ComponentManager.saveResource();
  }
}
Program: 122485
Project: 122485
Buggy source:
public void initializeComponents(IProgressMonitor monitor,boolean duringLogon){
  this.monitor=monitor;
  if (componentList == null) {
    init(duringLogon);
  }
  this.monitor=null;
  this.subMonitor=null;
}

Fixed version (ground truth):
@Override public void initializeComponents(IProgressMonitor monitor,boolean duringLogon){
  this.monitor=monitor;
  if (componentList == null) {
    init(duringLogon);
  }
  this.monitor=null;
  this.subMonitor=null;
}
Program: 122486
Project: 122486
Buggy source:
public void resetCache(){
  componentsImageRegistry.clear();
  componentList=null;
  skeletonList=null;
  customComponentList=null;
  allComponents=null;
  isReset=true;
  if (!CommonsPlugin.isHeadless()) {
    TalendEntryEditPart.resetImageCache();
  }
}

Fixed version (ground truth):
@Override public void resetCache(){
  componentsImageRegistry.clear();
  componentList=null;
  skeletonList=null;
  customComponentList=null;
  allComponents=null;
  isReset=true;
  if (!CommonsPlugin.isHeadless()) {
    TalendEntryEditPart.resetImageCache();
  }
}
Program: 122487
Project: 122487
Buggy source:
public int size(){
  if (componentList == null) {
    init(false);
  }
  return componentList.size();
}

Fixed version (ground truth):
@Override public int size(){
  if (componentList == null) {
    init(false);
  }
  return componentList.size();
}