nus-yam/ex-repair huggingface dataset:
Program: 72505
Project: 72505
Buggy source:
protected void addCaption(String caption){
  if (caption == null || "String_Node_Str".equals(caption)) {
    return;
  }
  IReportContent report=tableContent.getReportContent();
  ILabelContent captionLabel=report.createLabelContent();
  captionLabel.setText(caption);
  captionLabel.getStyle().setProperty(IStyle.STYLE_TEXT_ALIGN,IStyle.CENTER_VALUE);
  ICellContent cell=report.createCellContent();
  cell.setColSpan(tableContent.getColumnCount());
  cell.setRowSpan(1);
  cell.setColumn(0);
  captionLabel.setParent(cell);
  cell.getChildren().add(captionLabel);
  IRowContent row=report.createRowContent();
  row.getChildren().add(cell);
  cell.setParent(row);
  ITableBandContent band=report.createTableBandContent();
  band.getChildren().add(row);
  row.setParent(band);
  band.setParent(tableContent);
  Layout regionLayout=new RegionLayout(context,band,null);
  regionLayout.layout();
  TableArea tableRegion=(TableArea)content.getExtension(IContent.LAYOUT_EXTENSION);
  if (tableRegion != null && tableRegion.getHeight() < getCurrentMaxContentHeight()) {
    Iterator iter=tableRegion.getChildren();
    while (iter.hasNext()) {
      RowArea rowArea=(RowArea)iter.next();
      addArea(rowArea);
    }
  }
  content.setExtension(IContent.LAYOUT_EXTENSION,null);
}

Fixed version (ground truth):
protected void addCaption(String caption){
  if (caption == null || "String_Node_Str".equals(caption)) {
    return;
  }
  Layout rLayout=getTableRegionLayout();
  rLayout.layout();
  TableArea tableRegion=(TableArea)content.getExtension(IContent.LAYOUT_EXTENSION);
  if (tableRegion != null) {
    Iterator iter=tableRegion.getChildren();
    while (iter.hasNext()) {
      RowArea rowArea=(RowArea)iter.next();
      addArea(rowArea);
    }
  }
  content.setExtension(IContent.LAYOUT_EXTENSION,null);
}
Program: 72506
Project: 72506
Buggy source:
protected void initialize(){
  createRoot();
  buildTableLayoutInfo();
  root.setWidth(layoutInfo.getTableWidth());
  maxAvaWidth=layoutInfo.getTableWidth();
  rowCount=0;
  if (parent != null) {
    root.setAllocatedHeight(parent.getCurrentMaxContentHeight());
  }
 else {
    root.setAllocatedHeight(context.getMaxHeight());
  }
  if (layout == null) {
    int start=0;
    int end=tableContent.getColumnCount() - 1;
    layout=new TableAreaLayout(tableContent,layoutInfo,start,end);
  }
}

Fixed version (ground truth):
protected void initialize(){
  createRoot();
  buildTableLayoutInfo();
  root.setWidth(layoutInfo.getTableWidth());
  maxAvaWidth=layoutInfo.getTableWidth();
  rowCount=0;
  if (parent != null) {
    root.setAllocatedHeight(parent.getCurrentMaxContentHeight());
  }
 else {
    root.setAllocatedHeight(context.getMaxHeight());
  }
  if (layout == null) {
    int start=0;
    int end=tableContent.getColumnCount() - 1;
    layout=new TableAreaLayout(tableContent,layoutInfo,start,end);
  }
  addCaption(tableContent.getCaption());
}
Program: 72507
Project: 72507
Buggy source:
public boolean endLine(){
  boolean ret=true;
  if (root != null && root.getChildrenCount() > 0) {
    closeLayout();
  }
  if (lineParent != null) {
    ret=lineParent.endLine();
    initialize();
  }
  return true;
}

Fixed version (ground truth):
public boolean endLine(){
  lineCount++;
  boolean ret=true;
  if (root != null && root.getChildrenCount() > 0) {
    closeLayout();
  }
  if (lineParent != null) {
    ret=lineParent.endLine();
    initialize();
  }
  return true;
}
Program: 72508
Project: 72508
Buggy source:
protected void closeLayout(){
  if (root != null) {
    IStyle areaStyle=root.getStyle();
    int width=getCurrentIP() + getOffsetX() + getDimensionValue(areaStyle.getProperty(StyleConstants.STYLE_PADDING_RIGHT))+ getDimensionValue(areaStyle.getProperty(StyleConstants.STYLE_BORDER_RIGHT_WIDTH));
    root.setWidth(width);
    int height=0;
    Iterator iter=root.getChildren();
    while (iter.hasNext()) {
      AbstractArea child=(AbstractArea)iter.next();
      height=Math.max(height,child.getAllocatedHeight());
    }
    root.setContentHeight(height);
  }
  verticalAlign();
  parent.addArea(root);
}

Fixed version (ground truth):
protected void closeLayout(){
  if (root != null) {
    IStyle areaStyle=root.getStyle();
    int width=getCurrentIP() + getOffsetX() + getDimensionValue(areaStyle.getProperty(StyleConstants.STYLE_PADDING_RIGHT))+ getDimensionValue(areaStyle.getProperty(StyleConstants.STYLE_BORDER_RIGHT_WIDTH));
    if (lineCount == 1) {
      calculateSpecifiedWidth();
      if (specifiedWidth > width) {
        width=specifiedWidth;
      }
    }
    root.setWidth(width);
    int height=0;
    Iterator iter=root.getChildren();
    while (iter.hasNext()) {
      AbstractArea child=(AbstractArea)iter.next();
      height=Math.max(height,child.getAllocatedHeight());
    }
    root.setContentHeight(height);
  }
  verticalAlign();
  parent.addArea(root);
}
Program: 72509
Project: 72509
Buggy source:
public Object visitForeign(IForeignContent foreign,Object value){
  assert(false);
  return null;
}

Fixed version (ground truth):
public Object visitForeign(IForeignContent foreign,Object value){
  boolean isInline=PropertyUtil.isInlineElement(foreign);
  if (isInline) {
    return new InlineContainerLayout(context,parent,foreign);
  }
 else {
    return new BlockStackingLayout(context,parent,foreign);
  }
}
Program: 72510
Project: 72510
Buggy source:
public Object visitTableGroup(ITableGroupContent group,Object value){
  return new BlockStackingLayout(context,parent,group);
}

Fixed version (ground truth):
public Object visitTableGroup(ITableGroupContent group,Object value){
  return new TableBandLayout(context,parent,group);
}
Program: 72511
Project: 72511
Buggy source:
public void startForeign(IForeignContent foreign){
  if (IForeignContent.HTML_TYPE.equals(foreign.getRawType())) {
    HTML2Content.html2Content(foreign);
    java.util.Collection children=foreign.getChildren();
    if (children != null && !children.isEmpty()) {
      Iterator iter=children.iterator();
      IContent child=(IContent)iter.next();
      visitContent(child,this);
    }
    foreign.getChildren().clear();
  }
 else {
    startContent(foreign);
  }
}

Fixed version (ground truth):
public void startForeign(IForeignContent foreign){
  if (IForeignContent.HTML_TYPE.equals(foreign.getRawType())) {
    _startContainer(foreign);
    HTML2Content.html2Content(foreign);
    java.util.Collection children=foreign.getChildren();
    if (children != null && !children.isEmpty()) {
      Iterator iter=children.iterator();
      IContent child=(IContent)iter.next();
      visitContent(child,this);
    }
    foreign.getChildren().clear();
    _endContainer(foreign);
  }
 else {
    startContent(foreign);
  }
}
Program: 72512
Project: 72512
Buggy source:
public void endContainer(IContainerContent container){
  boolean isInline=PropertyUtil.isInlineElement(container);
  ContainerLayout layout;
  if (isInline) {
    if (current instanceof InlineStackingLayout) {
    }
 else {
      assert(false);
    }
  }
 else {
    if (current instanceof InlineStackingLayout) {
      while (current instanceof InlineStackingLayout) {
        current.closeLayout();
        current=current.getParent();
      }
    }
 else {
    }
  }
  current.closeLayout();
  current=current.getParent();
}

Fixed version (ground truth):
public void endContainer(IContainerContent container){
  _endContainer(container);
}
Program: 72513
Project: 72513
Buggy source:
public void startContainer(IContainerContent container){
  boolean isInline=PropertyUtil.isInlineElement(container);
  Layout layout;
  if (isInline) {
    if (current instanceof InlineStackingLayout) {
    }
 else {
      Layout lineLayout=factory.createLayoutManager(current,null);
      lineLayout.initialize();
      current=(ContainerLayout)lineLayout;
    }
  }
 else {
    if (current instanceof InlineStackingLayout) {
      while (current instanceof InlineStackingLayout) {
        current.closeLayout();
        current=current.getParent();
      }
    }
  }
  layout=factory.createLayoutManager(current,container);
  if (layout != null) {
    current=(ContainerLayout)layout;
    layout.initialize();
  }
}

Fixed version (ground truth):
public void startContainer(IContainerContent container){
  _startContainer(container);
}
Program: 72514
Project: 72514
Buggy source:
public void endCell(ICellContent cell){
  endTableContainer(cell);
}

Fixed version (ground truth):
public void endCell(ICellContent cell){
  endContainer(cell);
}
Program: 72515
Project: 72515
Buggy source:
/** 
 * Gets the baseline
 * @return the baseline
 */
public int getBaseLine(){
  return height;
}

Fixed version (ground truth):
/** 
 * Gets the baseline
 * @return the baseline
 */
public int getBaseLine(){
  if (baseLine == 0) {
    return height;
  }
 else {
    return baseLine;
  }
}
Program: 72516
Project: 72516
Buggy source:
public TextArea(ITextContent textContent,int offset,int baseLevel,int runDirection,FontInfo fontInfo){
  super(textContent);
  this.textContent=textContent;
  this.fi=fontInfo;
  height=(int)(fi.getWordHeight() * PDFConstants.LAYOUT_TO_PDF_RATIO);
  this.offset=offset;
  this.runDirection=runDirection;
  this.lineBreak=false;
  removePadding();
  removeBorder();
  removeMargin();
}

Fixed version (ground truth):
public TextArea(ITextContent textContent,int offset,int baseLevel,int runDirection,FontInfo fontInfo){
  super(textContent);
  this.textContent=textContent;
  this.fi=fontInfo;
  height=(int)(fi.getWordHeight() * PDFConstants.LAYOUT_TO_PDF_RATIO);
  baseLine=this.fi.getBaseline();
  this.offset=offset;
  this.runDirection=runDirection;
  this.lineBreak=false;
  removePadding();
  removeBorder();
  removeMargin();
}
Program: 72517
Project: 72517
Buggy source:
private int getMaxBaseLine(){
  int maxChildrenBaseLine=root.getMaxChildrenBaseLine();
  if (maxChildrenBaseLine == 0) {
    Iterator iter=root.getChildren();
    int maxChildrenBaseLineBelow=root.getMaxChildrenBaseLineBelow();
    while (iter.hasNext()) {
      AbstractArea child=(AbstractArea)iter.next();
      maxChildrenBaseLine=Math.max(maxChildrenBaseLine,child.getBaseLine());
      maxChildrenBaseLineBelow=Math.max(maxChildrenBaseLineBelow,child.getAllocatedHeight() - child.getBaseLine());
    }
    root.setContentHeight(Math.max(root.getContentHeight(),maxChildrenBaseLine + maxChildrenBaseLineBelow));
    root.setMaxChildrenBaseLine(maxChildrenBaseLine);
    root.setMaxChildrenBaseLineBelow(maxChildrenBaseLineBelow);
  }
  return maxChildrenBaseLine;
}

Fixed version (ground truth):
private int getMaxBaseLine(){
  int maxChildrenBaseLine=root.getMaxChildrenBaseLine();
  if (maxChildrenBaseLine == 0) {
    Iterator iter=root.getChildren();
    int maxChildrenBaseLineBelow=root.getMaxChildrenBaseLineBelow();
    while (iter.hasNext()) {
      AbstractArea child=(AbstractArea)iter.next();
      maxChildrenBaseLine=Math.max(maxChildrenBaseLine,child.getBaseLine());
      maxChildrenBaseLineBelow=Math.max(maxChildrenBaseLineBelow,child.getAllocatedHeight() - child.getBaseLine());
    }
    root.setContentHeight(Math.max(root.getContentHeight(),maxChildrenBaseLine + maxChildrenBaseLineBelow));
    root.setBaseLine(maxChildrenBaseLine);
    root.setMaxChildrenBaseLine(maxChildrenBaseLine);
    root.setMaxChildrenBaseLineBelow(maxChildrenBaseLineBelow);
  }
  return maxChildrenBaseLine;
}
Program: 72518
Project: 72518
Buggy source:
public TextArea getNextArea(int maxLineWidth){
  if (!hasNextArea()) {
    throw new RuntimeException("String_Node_Str");
  }
  TextArea textArea=getNextTextArea(maxLineWidth);
  offset+=textArea.getTextLength();
  System.out.print(textArea.getText());
  System.out.print("String_Node_Str" + offset + "String_Node_Str");
  return textArea;
}

Fixed version (ground truth):
public TextArea getNextArea(int maxLineWidth){
  if (!hasNextArea()) {
    throw new RuntimeException("String_Node_Str");
  }
  TextArea textArea=getNextTextArea(maxLineWidth);
  offset+=textArea.getTextLength();
  return textArea;
}
Program: 72519
Project: 72519
Buggy source:
public void start(){
  super.start();
  sum=0D;
}

Fixed version (ground truth):
public void start(){
  super.start();
  this.hasNotNullValue=false;
  sum=0D;
}
Program: 72520
Project: 72520
Buggy source:
public void testTotalSum() throws Exception {
  IAggrFunction ag=buildInAggrFactory.getAggregation("String_Node_Str");
  Accumulator ac=ag.newAccumulator();
  assertEquals(IBuildInAggregation.TOTAL_SUM_FUNC,ag.getName());
  assertEquals(IAggrFunction.SUMMARY_AGGR,ag.getType());
  assertEquals(1,ag.getParameterDefn().length);
  assertTrue(!ag.getParameterDefn()[0].isOptional());
  ac.start();
  for (int i=0; i < doubleArray1.length; i++) {
    ac.onRow(new Double[]{new Double(doubleArray1[i])});
  }
  ac.finish();
  assertEquals(new Double(82.0),ac.getValue());
  ac.start();
  for (int i=0; i < doubleArray2.length; i++) {
    ac.onRow(new Double[]{new Double(doubleArray2[i])});
  }
  ac.finish();
  assertEquals(new Double(69.0),ac.getValue());
  ac.start();
  for (int i=0; i < str1.length; i++) {
    ac.onRow(new Object[]{str1[i]});
  }
  ac.finish();
  assertEquals(new Double(69.0),ac.getValue());
  ac.start();
  ac.finish();
  assertEquals(new Double(0D),ac.getValue());
  ac.start();
  try {
    ac.getValue();
    assertTrue(false);
  }
 catch (  RuntimeException e) {
    assertTrue(true);
  }
  ac.start();
  try {
    for (int i=0; i < str2.length; i++) {
      ac.onRow(new Object[]{str2[i]});
    }
    fail();
  }
 catch (  DataException e) {
    assertTrue(true);
  }
  ac.finish();
  ac.start();
  for (int i=0; i < bigDecimalArray.length; i++) {
    ac.onRow(new Object[]{bigDecimalArray[i]});
  }
  ac.finish();
  assertEquals(new BigDecimal("String_Node_Str"),ac.getValue());
}

Fixed version (ground truth):
public void testTotalSum() throws Exception {
  IAggrFunction ag=buildInAggrFactory.getAggregation("String_Node_Str");
  Accumulator ac=ag.newAccumulator();
  assertEquals(IBuildInAggregation.TOTAL_SUM_FUNC,ag.getName());
  assertEquals(IAggrFunction.SUMMARY_AGGR,ag.getType());
  assertEquals(1,ag.getParameterDefn().length);
  assertTrue(!ag.getParameterDefn()[0].isOptional());
  ac.start();
  for (int i=0; i < doubleArray1.length; i++) {
    ac.onRow(new Double[]{new Double(doubleArray1[i])});
  }
  ac.finish();
  assertEquals(new Double(82.0),ac.getValue());
  ac.start();
  for (int i=0; i < doubleArray2.length; i++) {
    ac.onRow(new Double[]{new Double(doubleArray2[i])});
  }
  ac.finish();
  assertEquals(new Double(69.0),ac.getValue());
  ac.start();
  for (int i=0; i < str1.length; i++) {
    ac.onRow(new Object[]{str1[i]});
  }
  ac.finish();
  assertEquals(new Double(69.0),ac.getValue());
  ac.start();
  ac.finish();
  assertEquals(null,ac.getValue());
  ac.start();
  try {
    ac.getValue();
    assertTrue(false);
  }
 catch (  RuntimeException e) {
    assertTrue(true);
  }
  ac.start();
  try {
    for (int i=0; i < str2.length; i++) {
      ac.onRow(new Object[]{str2[i]});
    }
    fail();
  }
 catch (  DataException e) {
    assertTrue(true);
  }
  ac.finish();
  ac.start();
  for (int i=0; i < bigDecimalArray.length; i++) {
    ac.onRow(new Object[]{bigDecimalArray[i]});
  }
  ac.finish();
  assertEquals(new BigDecimal("String_Node_Str"),ac.getValue());
}
Program: 72521
Project: 72521
Buggy source:
/** 
 * Test whether all the column bindings exist.
 * @param bindingName
 * @param binding
 * @throws DataException
 */
private void checkColumnBindingExist(String bindingName,String referName,List binding,IBaseQueryDefinition baseQueryDefn) throws DataException {
  if (ScriptConstants.ROW_NUM_KEYWORD.equals(bindingName) || ScriptConstants.OUTER_RESULT_KEYWORD.equals(bindingName)) {
    return;
  }
  for (int i=0; i < binding.size(); i++) {
    if (bindingName.equals(binding.get(i).toString()))     return;
  }
  this.validateInParentQuery(bindingName,baseQueryDefn,referName);
}

Fixed version (ground truth):
/** 
 * Test whether all the column bindings exist.
 * @param bindingName
 * @param binding
 * @throws DataException
 */
private void checkColumnBindingExist(String bindingName,String referName,List binding,IBaseQueryDefinition baseQueryDefn) throws DataException {
  if (ScriptConstants.ROW_NUM_KEYWORD.equals(referName) || ScriptConstants.OUTER_RESULT_KEYWORD.equals(referName)) {
    return;
  }
  for (int i=0; i < binding.size(); i++) {
    if (referName.equals(binding.get(i).toString()))     return;
  }
  this.validateInParentQuery(bindingName,baseQueryDefn,referName);
}
Program: 72522
Project: 72522
Buggy source:
private void validateInParentQuery(String bindingName,IBaseQueryDefinition baseQueryDefn,String name) throws DataException {
  String expr=findExpression(bindingName,name,baseQueryDefn.getParentQuery());
  if (expr == null) {
    throw new DataException(ResourceConstants.COLUMN_BINDING_REFER_TO_INEXIST_BINDING,new Object[]{bindingName,name});
  }
 else   if (ExpressionUtil.hasAggregation(expr)) {
    throw new DataException(ResourceConstants.COLUMN_BINDING_REFER_TO_AGGREGATION_COLUMN_BINDING_IN_PARENT_QUERY,bindingName);
  }
}

Fixed version (ground truth):
private void validateInParentQuery(String bindingName,IBaseQueryDefinition baseQueryDefn,String name) throws DataException {
  if (baseQueryDefn == null)   throw new DataException(ResourceConstants.COLUMN_BINDING_REFER_TO_INEXIST_BINDING,new Object[]{bindingName,name});
  String expr=findExpression(bindingName,name,baseQueryDefn.getParentQuery());
  if (expr == null) {
    throw new DataException(ResourceConstants.COLUMN_BINDING_REFER_TO_INEXIST_BINDING,new Object[]{bindingName,name});
  }
 else   if (ExpressionUtil.hasAggregation(expr)) {
    throw new DataException(ResourceConstants.COLUMN_BINDING_REFER_TO_AGGREGATION_COLUMN_BINDING_IN_PARENT_QUERY,bindingName);
  }
}
Program: 72523
Project: 72523
Buggy source:
/** 
 * @param a
 * @param b
 * @return
 */
private BigDecimal[] convert(Object a,Object b) throws DataException {
  BigDecimal[] args=new BigDecimal[2];
  args[0]=(a instanceof Number) ? BigDecimal.valueOf(((Number)a).doubleValue()) : (BigDecimal)a;
  args[1]=(b instanceof Number) ? BigDecimal.valueOf(((Number)b).doubleValue()) : (BigDecimal)b;
  return args;
}

Fixed version (ground truth):
/** 
 * @param a
 * @param b
 * @return
 */
private BigDecimal[] convert(Object a,Object b) throws DataException {
  BigDecimal[] args=new BigDecimal[2];
  args[0]=(!(a instanceof BigDecimal)) ? BigDecimal.valueOf(((Number)a).doubleValue()) : (BigDecimal)a;
  args[1]=(!(b instanceof BigDecimal)) ? BigDecimal.valueOf(((Number)b).doubleValue()) : (BigDecimal)b;
  return args;
}
Program: 72524
Project: 72524
Buggy source:
/** 
 * Create a URLClassLoader based on the given file list
 * @param jdbcDriverFiles a File List
 * @return URLClassLoader
 */
private static URLClassLoader createClassLoader(List jdbcDriverFiles){
  URL[] urlList=new URL[jdbcDriverFiles.size()];
  for (int i=0; i < jdbcDriverFiles.size(); i++) {
    try {
      urlList[i]=new URL("String_Node_Str",null,((File)jdbcDriverFiles.get(i)).getAbsolutePath());
    }
 catch (    MalformedURLException e) {
      ExceptionHandler.showException(PlatformUI.getWorkbench().getDisplay().getActiveShell(),JdbcPlugin.getResourceString("String_Node_Str"),e.getLocalizedMessage(),e);
    }
  }
  URLClassLoader urlClassLoader=new URLClassLoader(urlList,ClassLoader.getSystemClassLoader());
  return urlClassLoader;
}

Fixed version (ground truth):
/** 
 * Create a URLClassLoader based on the given file list
 * @param jdbcDriverFiles a File List
 * @return URLClassLoader
 */
private static URLClassLoader createClassLoader(File jdbcDriverFile){
  URL[] urlList=new URL[1];
  try {
    urlList[0]=new URL("String_Node_Str",null,jdbcDriverFile.getAbsolutePath());
  }
 catch (  MalformedURLException e) {
    ExceptionHandler.showException(PlatformUI.getWorkbench().getDisplay().getActiveShell(),JdbcPlugin.getResourceString("String_Node_Str"),e.getLocalizedMessage(),e);
  }
  URLClassLoader urlClassLoader=new URLClassLoader(urlList,ClassLoader.getSystemClassLoader());
  return urlClassLoader;
}
Program: 72525
Project: 72525
Buggy source:
/** 
 * Found drivers in the Jar file List
 * @param file
 * @return a List of JDBCDriverInformation
 */
public static void getJdbcDriverFromFile(List fileList){
  if (failLoadFileList != null) {
    boolean duplicated;
    for (int i=0; i < failLoadFileList.size(); i++) {
      duplicated=false;
      File failToLoadFile=(File)failLoadFileList.get(i);
      for (int j=0; j < fileList.size(); j++) {
        if (failToLoadFile.getName().equals(((File)fileList.get(j)).getName())) {
          duplicated=true;
          break;
        }
      }
      if (!duplicated)       fileList.add(failToLoadFile);
    }
  }
  URLClassLoader urlClassLoader=createClassLoader(fileList);
  jdbcDriverInfos.addAll(getJDBCDriverInfoList(fileList,urlClassLoader));
}

Fixed version (ground truth):
/** 
 * Found drivers in the Jar file List
 * @param file
 * @return a List of JDBCDriverInformation
 */
public static void getJdbcDriverFromFile(List fileList){
  if (failLoadFileList != null) {
    boolean duplicated;
    for (int i=0; i < failLoadFileList.size(); i++) {
      duplicated=false;
      File failToLoadFile=(File)failLoadFileList.get(i);
      for (int j=0; j < fileList.size(); j++) {
        if (failToLoadFile.getName().equals(((File)fileList.get(j)).getName())) {
          duplicated=true;
          break;
        }
      }
      if (!duplicated)       fileList.add(failToLoadFile);
    }
  }
  jdbcDriverInfos.addAll(getJDBCDriverInfoList(fileList));
}
Program: 72526
Project: 72526
Buggy source:
/** 
 * Get the corresponding drivers list by the given JarFile
 * @param JarFile jar
 * @return List that contains the corresponding drivers
 */
public static List getDriverByJar(JarFile jar){
  List drivers=null;
  if (jar == null)   return drivers;
  List jarList=new ArrayList(1);
  jarList.add(new File(jar.getFilePath()));
  URLClassLoader urlClassLoader=createClassLoader(jarList);
  drivers=getJDBCDriverInfoList(jarList,urlClassLoader);
  return drivers;
}

Fixed version (ground truth):
/** 
 * Get the corresponding drivers list by the given JarFile
 * @param JarFile jar
 * @return List that contains the corresponding drivers
 */
public static List getDriverByJar(JarFile jar){
  List drivers=null;
  if (jar == null)   return drivers;
  List jarList=new ArrayList(1);
  jarList.add(new File(jar.getFilePath()));
  drivers=getJDBCDriverInfoList(jarList);
  return drivers;
}
Program: 72527
Project: 72527
Buggy source:
/** 
 * Get a List of JDBCDriverInformations loaded from the given fileList
 * @param fileList the File List
 * @param urlClassLoader
 * @return List of JDBCDriverInformation
 */
private static List getJDBCDriverInfoList(List fileList,URLClassLoader urlClassLoader){
  List driverList=new ArrayList();
  for (int i=0; i < fileList.size(); i++) {
    String[] resourceNames=getAllResouceNames((File)fileList.get(i));
    List subDriverList=new ArrayList();
    for (int j=0; j < resourceNames.length; j++) {
      String resourceName=resourceNames[j];
      if (resourceName.endsWith("String_Node_Str")) {
        resourceName=modifyResourceName(resourceName);
        Class aClass=loadClass(urlClassLoader,resourceName);
        if (isImplementedDriver(aClass)) {
          JDBCDriverInformation info=JDBCDriverInformation.newInstance(aClass);
          if (info != null) {
            driverList.add(info);
            subDriverList.add(info);
          }
        }
      }
    }
    if (subDriverList.isEmpty()) {
      if (!failLoadFileList.contains(fileList.get(i)))       failLoadFileList.add(fileList.get(i));
    }
 else {
      if (failLoadFileList.contains(fileList.get(i)))       failLoadFileList.remove(fileList.get(i));
    }
    file2Drivers.put(((File)fileList.get(i)).getName(),subDriverList);
  }
  return driverList;
}

Fixed version (ground truth):
/** 
 * Get a List of JDBCDriverInformations loaded from the given fileList
 * @param fileList the File List
 * @param urlClassLoader
 * @return List of JDBCDriverInformation
 */
private static List getJDBCDriverInfoList(List fileList){
  List driverList=new ArrayList();
  for (int i=0; i < fileList.size(); i++) {
    URLClassLoader urlClassLoader=createClassLoader((File)fileList.get(i));
    String[] resourceNames=getAllResouceNames((File)fileList.get(i));
    List subDriverList=new ArrayList();
    for (int j=0; j < resourceNames.length; j++) {
      String resourceName=resourceNames[j];
      if (resourceName.endsWith("String_Node_Str")) {
        resourceName=modifyResourceName(resourceName);
        Class aClass=loadClass(urlClassLoader,resourceName);
        if (isImplementedDriver(aClass)) {
          JDBCDriverInformation info=JDBCDriverInformation.newInstance(aClass);
          if (info != null) {
            driverList.add(info);
            subDriverList.add(info);
          }
        }
      }
    }
    if (subDriverList.isEmpty()) {
      if (!failLoadFileList.contains(fileList.get(i)))       failLoadFileList.add(fileList.get(i));
    }
 else {
      if (failLoadFileList.contains(fileList.get(i)))       failLoadFileList.remove(fileList.get(i));
    }
    file2Drivers.put(((File)fileList.get(i)).getName(),subDriverList);
  }
  return driverList;
}
Program: 72528
Project: 72528
Buggy source:
/** 
 * Search files under "drivers" directory for JDBC drivers. Found drivers are added to jdbdDriverInfos as JDBCDriverInformation instances
 */
private static void addDriversFromFiles(){
  List jdbcDriverFiles=JdbcDriverConfigUtil.getDriverFiles();
  if (jdbcDriverFiles == null || jdbcDriverFiles.size() == 0)   return;
  URLClassLoader urlClassLoader=createClassLoader(jdbcDriverFiles);
  List driverList=getJDBCDriverInfoList(jdbcDriverFiles,urlClassLoader);
  jdbcDriverInfos.addAll(driverList);
  for (int i=0; i < driverList.size(); i++) {
    JDBCDriverInformation info=(JDBCDriverInformation)driverList.get(i);
    driverNameMap.put(info.getDriverClassName(),info);
  }
}

Fixed version (ground truth):
/** 
 * Search files under "drivers" directory for JDBC drivers. Found drivers are added to jdbdDriverInfos as JDBCDriverInformation instances
 */
private static void addDriversFromFiles(){
  List jdbcDriverFiles=JdbcDriverConfigUtil.getDriverFiles();
  if (jdbcDriverFiles == null || jdbcDriverFiles.size() == 0)   return;
  List driverList=getJDBCDriverInfoList(jdbcDriverFiles);
  jdbcDriverInfos.addAll(driverList);
  for (int i=0; i < driverList.size(); i++) {
    JDBCDriverInformation info=(JDBCDriverInformation)driverList.get(i);
    driverNameMap.put(info.getDriverClassName(),info);
  }
}
Program: 72529
Project: 72529
Buggy source:
public Object visitTableBand(ITableBandContent tableBand,Object value){
  return new BlockStackingLayout(context,parent,tableBand);
}

Fixed version (ground truth):
public Object visitTableBand(ITableBandContent tableBand,Object value){
  return new TableBandLayout(context,parent,tableBand);
}
Program: 72530
Project: 72530
Buggy source:
/** 
 * @param stream
 * @param consumer
 */
public SaxParser(XMLDataInputStream stream,ISaxParserConsumer consumer){
  super(stream,consumer);
}

Fixed version (ground truth):
/** 
 * @param stream
 * @param consumer
 */
public SaxParser(XMLDataInputStream stream,ISaxParserConsumer consumer,boolean useNameSpace){
  super(stream,consumer,useNameSpace);
}
Program: 72532
Project: 72532
Buggy source:
/** 
 * @return
 */
public static List getDriverList(){
  return jdbcDriverInfos;
}

Fixed version (ground truth):
/** 
 * @return
 */
public static List getDriverList(){
  HashSet jdbcDriverSet=new HashSet();
  for (int i=0; i < jdbcDriverInfos.size(); i++) {
    jdbcDriverSet.add(jdbcDriverInfos.get(i));
  }
  return new ArrayList(jdbcDriverSet);
}
Program: 72533
Project: 72533
Buggy source:
public static IArea createTextArea(ITextContent content,String text,FontInfo fi){
  return new TextArea(content,text,fi);
}

Fixed version (ground truth):
public static IArea createTextArea(ITextContent textContent,int offset,int baseLevel,int runDirection,FontInfo fontInfo){
  return new TextArea(textContent,offset,baseLevel,runDirection,fontInfo);
}
Program: 72534
Project: 72534
Buggy source:
public String getText(){
  if (blankLine) {
    return null;
  }
 else {
    this.text=textContent.getText().substring(offset,offset + textLength);
    return text;
  }
}

Fixed version (ground truth):
/** 
 * Gets the text in visual order.
 * @param text the original text.
 * @return the text in visual order.
 */
public String getText(){
  calculateText();
  if (runDirection == Bidi.DIRECTION_LEFT_TO_RIGHT) {
    return text;
  }
 else {
    return flip(text);
  }
}
Program: 72535
Project: 72535
Buggy source:
protected void resolveTotalPage(IContentEmitter emitter){
  IContent con=context.getUnresolvedContent();
  if (!(con instanceof IAutoTextContent)) {
    return;
  }
  IAutoTextContent totalPageContent=(IAutoTextContent)con;
  if (null != totalPageContent) {
    NumberFormatter nf=new NumberFormatter();
    String patternStr=totalPageContent.getComputedStyle().getNumberFormat();
    nf.applyPattern(patternStr);
    long totalPageCount=context.totalPage > 0 ? context.totalPage : context.pageCount;
    totalPageContent.setText(nf.format(totalPageCount));
    AbstractArea totalPageArea=null;
    ChunkGenerator cg=new ChunkGenerator(context.getFontManager(),totalPageContent,true,true);
    if (cg.hasMore()) {
      Chunk c=cg.getNext();
      Dimension d=new Dimension((int)(c.getFontInfo().getWordWidth(c.getText()) * PDFConstants.LAYOUT_TO_PDF_RATIO),(int)(c.getFontInfo().getWordHeight() * PDFConstants.LAYOUT_TO_PDF_RATIO));
      totalPageArea=(AbstractArea)AreaFactory.createTextArea(totalPageContent,c.getText(),c.getFontInfo());
      totalPageArea.setWidth(Math.min(context.getMaxWidth(),d.getWidth()));
      totalPageArea.setHeight(Math.min(context.getMaxHeight(),d.getHeight()));
    }
    totalPageContent.setExtension(IContent.LAYOUT_EXTENSION,totalPageArea);
    emitter.startAutoText(totalPageContent);
  }
}

Fixed version (ground truth):
protected void resolveTotalPage(IContentEmitter emitter){
  IContent con=context.getUnresolvedContent();
  if (!(con instanceof IAutoTextContent)) {
    return;
  }
  IAutoTextContent totalPageContent=(IAutoTextContent)con;
  if (null != totalPageContent) {
    NumberFormatter nf=new NumberFormatter();
    String patternStr=totalPageContent.getComputedStyle().getNumberFormat();
    nf.applyPattern(patternStr);
    long totalPageCount=context.totalPage > 0 ? context.totalPage : context.pageCount;
    totalPageContent.setText(nf.format(totalPageCount));
    AbstractArea totalPageArea=null;
    ChunkGenerator cg=new ChunkGenerator(context.getFontManager(),totalPageContent,true,true);
    if (cg.hasMore()) {
      Chunk c=cg.getNext();
      Dimension d=new Dimension((int)(c.getFontInfo().getWordWidth(c.getText()) * PDFConstants.LAYOUT_TO_PDF_RATIO),(int)(c.getFontInfo().getWordHeight() * PDFConstants.LAYOUT_TO_PDF_RATIO));
      totalPageArea=(AbstractArea)AreaFactory.createTextArea(totalPageContent,c.getFontInfo(),false);
      totalPageArea.setWidth(Math.min(context.getMaxWidth(),d.getWidth()));
      totalPageArea.setHeight(Math.min(context.getMaxHeight(),d.getHeight()));
    }
    totalPageContent.setExtension(IContent.LAYOUT_EXTENSION,totalPageArea);
    emitter.startAutoText(totalPageContent);
  }
}
Program: 72536
Project: 72536
Buggy source:
private TextArea getNextTextArea(int maxLineWidth){
  if (null != wordVestige) {
    TextArea textArea=new TextArea(textContent,offset,lineBaseLevel,lineRunDirection,fontInfo);
    textArea.setMaxWidth(maxLineWidth);
    textArea.setWidth(0);
    addWordIntoTextArea(textArea,wordVestige);
    return textArea;
  }
  if (null != remainWord) {
    TextArea textArea=new TextArea(textContent,offset,lineBaseLevel,lineRunDirection,fontInfo);
    textArea.setMaxWidth(maxLineWidth);
    textArea.setWidth(0);
    addWordIntoTextArea(textArea,remainWord);
    remainWord=null;
    return textArea;
  }
  if (null == remainWords || !remainWords.hasWord()) {
    Chunk chunk=remainChunks.getNext();
    if (chunk == Chunk.HARD_LINE_BREAK) {
      FontHandler handler=new FontHandler(fontManager,textContent,false);
      TextArea textArea=new TextArea(textContent,handler.getFontInfo());
      textArea.setTextLength(1);
      hasLineBreak=true;
      return textArea;
    }
    fontInfo=chunk.getFontInfo();
    lineBaseLevel=chunk.getBaseLevel();
    lineRunDirection=chunk.getRunDirection();
    remainWords=new WordRecognizerWrapper(chunk.getText(),locale);
  }
  TextArea textArea=new TextArea(textContent,offset,lineBaseLevel,lineRunDirection,fontInfo);
  textArea.setMaxWidth(maxLineWidth);
  textArea.setWidth(0);
  addWordsIntoTextArea(textArea,remainWords);
  return textArea;
}

Fixed version (ground truth):
private TextArea getNextTextArea(int maxLineWidth){
  if (null != wordVestige) {
    TextArea textArea=(TextArea)AreaFactory.createTextArea(textContent,offset,lineBaseLevel,lineRunDirection,fontInfo);
    textArea.setMaxWidth(maxLineWidth);
    textArea.setWidth(0);
    addWordIntoTextArea(textArea,wordVestige);
    return textArea;
  }
  if (null != remainWord) {
    TextArea textArea=(TextArea)AreaFactory.createTextArea(textContent,offset,lineBaseLevel,lineRunDirection,fontInfo);
    textArea.setMaxWidth(maxLineWidth);
    textArea.setWidth(0);
    addWordIntoTextArea(textArea,remainWord);
    remainWord=null;
    return textArea;
  }
  if (null == remainWords || !remainWords.hasWord()) {
    Chunk chunk=remainChunks.getNext();
    if (chunk == Chunk.HARD_LINE_BREAK) {
      FontHandler handler=new FontHandler(fontManager,textContent,false);
      TextArea textArea=(TextArea)AreaFactory.createTextArea(textContent,handler.getFontInfo(),true);
      textArea.setTextLength(1);
      hasLineBreak=true;
      return textArea;
    }
    fontInfo=chunk.getFontInfo();
    lineBaseLevel=chunk.getBaseLevel();
    lineRunDirection=chunk.getRunDirection();
    remainWords=new WordRecognizerWrapper(chunk.getText(),locale);
  }
  TextArea textArea=(TextArea)AreaFactory.createTextArea(textContent,offset,lineBaseLevel,lineRunDirection,fontInfo);
  textArea.setMaxWidth(maxLineWidth);
  textArea.setWidth(0);
  addWordsIntoTextArea(textArea,remainWords);
  return textArea;
}
Program: 72537
Project: 72537
Buggy source:
public void testFixedTableLayout() throws EngineException {
  String designFile="String_Node_Str";
  List pageAreas=getpageAreas(designFile);
  assertEquals(1,pageAreas.size());
  PageArea pageArea=(PageArea)pageAreas.get(0);
  ContainerArea body=(ContainerArea)pageArea.getBody();
  assertTrue(body.getChildrenCount() == 11);
  Iterator iter=body.getChildren();
  TableArea table=(TableArea)iter.next();
  validateColumnWidth(table,new int[]{144,288,0});
  table=(TableArea)iter.next();
  validateColumnWidth(table,new int[]{144,108,180});
  table=(TableArea)iter.next();
  validateColumnWidth(table,new int[]{144,177,111});
  table=(TableArea)iter.next();
  validateColumnWidth(table,new int[]{144,72,216});
  table=(TableArea)iter.next();
  validateColumnWidth(table,new int[]{108,108,216});
  table=(TableArea)iter.next();
  validateColumnWidth(table,new int[]{144,208,80});
  table=(TableArea)iter.next();
  validateColumnWidth(table,new int[]{432,0,0});
  table=(TableArea)iter.next();
  validateColumnWidth(table,new int[]{216,432,0});
  table=(TableArea)iter.next();
  validateColumnWidth(table,new int[]{216,432,0});
  table=(TableArea)iter.next();
  validateColumnWidth(table,new int[]{216,216,0});
  table=(TableArea)iter.next();
  validateColumnWidth(table,new int[]{50,10,40});
}

Fixed version (ground truth):
public void testFixedTableLayout() throws EngineException {
  String designFile="String_Node_Str";
  List pageAreas=getpageAreas(designFile);
  assertEquals(1,pageAreas.size());
  PageArea pageArea=(PageArea)pageAreas.get(0);
  ContainerArea body=(ContainerArea)pageArea.getBody();
  assertTrue(body.getChildrenCount() == 11);
  Iterator iter=body.getChildren();
  TableArea table=(TableArea)iter.next();
  validateColumnWidth(table,new int[]{144,288,0});
  table=(TableArea)iter.next();
  validateColumnWidth(table,new int[]{144,108,180});
  table=(TableArea)iter.next();
  validateColumnWidth(table,new int[]{144,177,111});
  table=(TableArea)iter.next();
  validateColumnWidth(table,new int[]{144,72,216});
  table=(TableArea)iter.next();
  validateColumnWidth(table,new int[]{108,108,216});
  table=(TableArea)iter.next();
  validateColumnWidth(table,new int[]{144,208,80});
  table=(TableArea)iter.next();
  validateColumnWidth(table,new int[]{0,432,0});
  table=(TableArea)iter.next();
  validateColumnWidth(table,new int[]{216,432,0});
  table=(TableArea)iter.next();
  validateColumnWidth(table,new int[]{216,432,0});
  table=(TableArea)iter.next();
  validateColumnWidth(table,new int[]{216,216});
  table=(TableArea)iter.next();
  validateColumnWidth(table,new int[]{50,10,40});
}
Program: 72538
Project: 72538
Buggy source:
protected boolean isPagedExecutor(){
  if (ExtensionManager.PAPER_SIZE_PAGINATION.equals(pagination)) {
    return !needPaginate();
  }
  boolean paged=true;
  IRenderOption renderOption=executionContext.getRenderOption();
  HTMLRenderOption htmlRenderOption=new HTMLRenderOption(renderOption);
  boolean htmlPagination=htmlRenderOption.getHtmlPagination();
  if (!htmlPagination) {
    paged=false;
  }
  return paged;
}

Fixed version (ground truth):
protected boolean isPagedExecutor(){
  boolean paged=true;
  IRenderOption renderOption=executionContext.getRenderOption();
  HTMLRenderOption htmlRenderOption=new HTMLRenderOption(renderOption);
  boolean htmlPagination=htmlRenderOption.getHtmlPagination();
  if (!htmlPagination) {
    paged=false;
  }
  return paged;
}
Program: 72540
Project: 72540
Buggy source:
public static IReportLayoutEngine createLayoutEngine(String paginationType){
  if (ExtensionManager.PAPER_SIZE_PAGINATION.equals(paginationType)) {
    try {
      Class clazz=Class.forName("String_Node_Str");
      Object engine=clazz.newInstance();
      return (IReportLayoutEngine)engine;
    }
 catch (    Exception ex) {
    }
    return null;
  }
  return new HTMLReportLayoutEngine();
}

Fixed version (ground truth):
public static IReportLayoutEngine createLayoutEngine(String paginationType){
  return new HTMLReportLayoutEngine();
}
Program: 72541
Project: 72541
Buggy source:
public void openPage(IContent[] contentList,IContentEmitter emitter){
}

Fixed version (ground truth):
public void openPage(INode[] nodeList){
}
Program: 72542
Project: 72542
Buggy source:
public void closePage(IContent[] contentList,IContentEmitter emitter){
}

Fixed version (ground truth):
public void closePage(INode[] nodeList){
}
Program: 72543
Project: 72543
Buggy source:
public void flush(){
  if (page != null) {
    page.flush();
    pageBreakEvent();
    if (!page.finished) {
      context.setPageNumber(context.getPageNumber() + 1);
      context.setPageCount(context.getPageCount() + 1);
    }
    generator.reset();
    context.removeLayoutHint();
    context.clearPageHint();
    currentNode=null;
  }
}

Fixed version (ground truth):
public void flush(){
  if (page != null) {
    context.addTableColumnHints(columnHints);
    page.flush();
    pageBreakEvent();
    if (!page.finished) {
      context.setPageNumber(context.getPageNumber() + 1);
      context.setPageCount(context.getPageCount() + 1);
    }
    generator.reset();
    context.removeLayoutHint();
    context.clearPageHint();
    currentNode=null;
  }
}
Program: 72544
Project: 72544
Buggy source:
protected void pageBreakEvent(){
  context.setPageHint(generator.getPageHint());
  context.addTableColumnHints(columnHints);
  long pageNumber=context.getPageNumber();
  ILayoutPageHandler pageHandler=context.getLayoutEngine().getPageHandler();
  if (pageHandler != null) {
    pageHandler.onPage(pageNumber,context);
  }
}

Fixed version (ground truth):
protected void pageBreakEvent(){
  context.setPageHint(generator.getPageHint());
  long pageNumber=context.getPageNumber();
  ILayoutPageHandler pageHandler=context.getLayoutEngine().getPageHandler();
  if (pageHandler != null) {
    pageHandler.onPage(pageNumber,context);
  }
}
Program: 72545
Project: 72545
Buggy source:
public void openPage(IContent[] contentList,IContentEmitter emitter){
}

Fixed version (ground truth):
public void openPage(INode[] nodeList){
}
Program: 72546
Project: 72546
Buggy source:
public void closePage(IContent[] contentList,IContentEmitter emitter){
}

Fixed version (ground truth):
public void closePage(INode[] nodeList){
}
Program: 72547
Project: 72547
Buggy source:
public void addTableColumnHint(TableColumnHint hint){
  columnHints.add(hint);
}

Fixed version (ground truth):
public void addTableColumnHint(TableColumnHint hint){
  context.addTableColumnHint(hint);
}
Program: 72548
Project: 72548
Buggy source:
public void openPage(IContent[] contentList,IContentEmitter emitter){
  int length=contentList.length;
  if (length > 0) {
    for (int i=length - 1; i >= 0; i--) {
      startContainer(contentList[i],false,emitter,true);
    }
  }
}

Fixed version (ground truth):
public void openPage(INode[] nodeList){
  int length=nodeList.length;
  if (length > 0) {
    for (int i=length - 1; i >= 0; i--) {
      AbstractNode node=(AbstractNode)nodeList[i];
      startContainer(node.content,false,node.emitter,true);
    }
  }
}
Program: 72549
Project: 72549
Buggy source:
protected void endCell(IContent content,boolean finished,IContentEmitter emitter,boolean visible){
  AbstractNode current=(AbstractNode)currentNode;
  if (!current.isFirst) {
    current.setFinished(false);
  }
 else {
    current.setFinished(finished);
  }
  if (currentNode.isStarted()) {
    currentNode.end();
  }
  currentNode=currentNode.getParent();
}

Fixed version (ground truth):
protected void endCell(IContent content,boolean finished,IContentEmitter emitter,boolean visible){
  AbstractNode current=(AbstractNode)currentNode;
  if (!current.isFirst) {
    current.setFinished(false);
  }
 else {
    current.setFinished(finished);
  }
  if (currentNode.isStarted()) {
    currentNode.end();
  }
 else {
  }
  currentNode=currentNode.getParent();
}
Program: 72550
Project: 72550
Buggy source:
public void closePage(IContent[] contentList,IContentEmitter emitter){
  int length=contentList.length;
  if (length > 0) {
    for (int i=0; i < length; i++) {
      endContainer(contentList[i],false,emitter,true);
    }
  }
  finished=true;
}

Fixed version (ground truth):
public void closePage(INode[] nodeList){
  int length=nodeList.length;
  if (length > 0) {
    for (int i=0; i < length; i++) {
      AbstractNode node=(AbstractNode)nodeList[i];
      endContainer(node.content,false,node.emitter,true);
    }
  }
  finished=true;
}
Program: 72551
Project: 72551
Buggy source:
protected void pageBreakEvent(){
  context.setPageHint(generator.getPageHint());
  context.addTableColumnHints(this.columnHints);
  long pageNumber=context.getPageNumber();
  ILayoutPageHandler pageHandler=context.getLayoutEngine().getPageHandler();
  if (pageHandler != null) {
    pageHandler.onPage(pageNumber,context);
  }
}

Fixed version (ground truth):
protected void pageBreakEvent(){
  context.setPageHint(generator.getPageHint());
  long pageNumber=context.getPageNumber();
  ILayoutPageHandler pageHandler=context.getLayoutEngine().getPageHandler();
  if (pageHandler != null) {
    pageHandler.onPage(pageNumber,context);
  }
}
Program: 72552
Project: 72552
Buggy source:
public void openPage(IContent[] contentList,IContentEmitter emitter);

Fixed version (ground truth):
public void openPage(INode[] nodeList);
Program: 72553
Project: 72553
Buggy source:
public void closePage(IContent[] contentList,IContentEmitter emitter);

Fixed version (ground truth):
public void closePage(INode[] nodeList);
Program: 72554
Project: 72554
Buggy source:
protected void closeLayout(){
  if (root == null) {
    return;
  }
  IStyle areaStyle=root.getStyle();
  int height=getCurrentBP() + getOffsetY() + getDimensionValue(areaStyle.getProperty(StyleConstants.STYLE_PADDING_BOTTOM))+ getDimensionValue(areaStyle.getProperty(StyleConstants.STYLE_BORDER_BOTTOM_WIDTH));
  root.setHeight(height);
  if (parent != null) {
    parent.addArea(root);
  }
 else {
    content.setExtension(IContent.LAYOUT_EXTENSION,root);
  }
}

Fixed version (ground truth):
protected void closeLayout(){
  if (root == null) {
    return;
  }
  IStyle areaStyle=root.getStyle();
  int height=getCurrentBP() + getOffsetY() + getDimensionValue(areaStyle.getProperty(StyleConstants.STYLE_PADDING_BOTTOM))+ getDimensionValue(areaStyle.getProperty(StyleConstants.STYLE_BORDER_BOTTOM_WIDTH));
  calculateSpecifiedHeight();
  if (specifiedHeight > height) {
    CSSValue verticalAlign=areaStyle.getProperty(IStyle.STYLE_VERTICAL_ALIGN);
    if (IStyle.BOTTOM_VALUE.equals(verticalAlign) || IStyle.MIDDLE_VALUE.equals(verticalAlign)) {
      int offset=specifiedHeight - height;
      if (IStyle.BOTTOM_VALUE.equals(verticalAlign)) {
        Iterator iter=root.getChildren();
        while (iter.hasNext()) {
          AbstractArea child=(AbstractArea)iter.next();
          child.setAllocatedPosition(child.getAllocatedX(),child.getAllocatedY() + offset);
        }
      }
 else       if (IStyle.MIDDLE_VALUE.equals(verticalAlign)) {
        Iterator iter=root.getChildren();
        while (iter.hasNext()) {
          AbstractArea child=(AbstractArea)iter.next();
          child.setAllocatedPosition(child.getAllocatedX(),child.getAllocatedY() + offset / 2);
        }
      }
    }
    height=specifiedHeight;
  }
  root.setHeight(height);
  if (parent != null) {
    parent.addArea(root);
  }
 else {
    content.setExtension(IContent.LAYOUT_EXTENSION,root);
  }
}
Program: 72555
Project: 72555
Buggy source:
/** 
 * Adds default connection profile property provider service, if none is already defined in the appContext object. This will trigger the use of the DTP ODA framework service to apply  the connection property values defined in an external connection profile store,  for opening a connection.
 * @param appContext    application context object passed thru into the data engine
 * @return          updated application context object for passing thruto the DTP oda.consumer 
 */
private Map addProfileProviderService(Map appContext){
  Map providerAppContext=appContext;
  if (providerAppContext == null)   providerAppContext=new HashMap();
  if (!providerAppContext.containsKey(IPropertyProvider.ODA_CONSUMER_ID)) {
    providerAppContext.put(IPropertyProvider.ODA_CONSUMER_ID,DTP_CONN_PROFILE_APPL_ID);
    if (getLogger().isLoggable(Level.INFO))     getLogger().logp(Level.INFO,sm_className,"String_Node_Str","String_Node_Str" + DTP_CONN_PROFILE_APPL_ID);
  }
  return providerAppContext;
}

Fixed version (ground truth):
/** 
 * Adds default connection profile property provider service, if none is already defined in the appContext object. This will trigger the use of the DTP ODA framework service to apply  the connection property values defined in an external connection profile store,  for opening a connection.
 * @param appContext    application context object passed thru into the data engine
 * @return          updated application context object for passing thruto the DTP oda.consumer 
 */
private Map addProfileProviderService(Map appContext){
  Map providerAppContext=appContext;
  if (providerAppContext == null)   providerAppContext=new HashMap();
  if (!providerAppContext.containsKey(IPropertyProvider.ODA_CONSUMER_ID)) {
    providerAppContext.put(IPropertyProvider.ODA_CONSUMER_ID,DTP_CONN_PROFILE_APPL_ID);
    if (getLogger().isLoggable(Level.FINE))     getLogger().logp(Level.FINE,sm_className,"String_Node_Str","String_Node_Str" + DTP_CONN_PROFILE_APPL_ID);
  }
  return providerAppContext;
}
Program: 72556
Project: 72556
Buggy source:
private void logNullNativeName(){
  if (getNativeName() != null)   return;
  sm_logger.logp(Level.INFO,sm_className + "String_Node_Str","String_Node_Str","String_Node_Str" + getRomName() + "String_Node_Str");
}

Fixed version (ground truth):
private void logNullNativeName(){
  if (getNativeName() != null)   return;
  sm_logger.logp(Level.FINE,sm_className + "String_Node_Str","String_Node_Str","String_Node_Str" + getRomName() + "String_Node_Str");
}