nus-yam/ex-repair huggingface dataset:
Program: 145626
Project: 145626
Buggy source:
protected synchronized void addFileToIndex(File aFile){
  try {
    String familyPath=fileNameWithoutExtension(aFile);
    if (familyPath != null) {
      AppElementFiles family=families.get(familyPath);
      if (family == null) {
        family=new AppElementFiles(null);
        families.put(familyPath,family);
      }
      Integer type1=family.getAppElementType();
      String id1=type1 != null ? family.getAppElementId(type1) : null;
      family.addFile(aFile);
      Integer type2=family.getAppElementType();
      String id2=type2 != null ? family.getAppElementId(type2) : null;
      id2Path.remove(path2Id.remove(familyPath));
      if (id2 != null) {
        path2Id.put(familyPath,id2);
        id2Path.put(id2,familyPath);
      }
      remove(id1);
    }
  }
 catch (  Exception ex) {
    Logger.getLogger(FilesAppCache.class.getName()).log(Level.SEVERE,null,ex);
  }
}

Fixed version (ground truth):
protected synchronized void addFileToIndex(File aFile){
  try {
    String familyPath=fileNameWithoutExtension(aFile);
    if (familyPath != null) {
      AppElementFiles family=families.get(familyPath);
      if (family == null) {
        family=new AppElementFiles(null);
        families.put(familyPath,family);
      }
      Integer type1=family.getAppElementType();
      String id1=type1 != null ? family.getAppElementId(type1) : null;
      family.addFile(aFile);
      Integer type2=family.getAppElementType();
      String id2=type2 != null ? family.getAppElementId(type2) : null;
      id2Path.remove(path2Id.remove(familyPath));
      if (id2 != null) {
        path2Id.put(familyPath,id2);
        id2Path.put(id2,familyPath);
      }
      remove(id1);
      remove(id2);
    }
  }
 catch (  Exception ex) {
    Logger.getLogger(FilesAppCache.class.getName()).log(Level.SEVERE,null,ex);
  }
}
Program: 145627
Project: 145627
Buggy source:
private void recursiveScopeSetup(Map<Node,List<Node>> aTree,Node aParent){
  List<Node> childs=aTree.get(aParent);
  if (childs != null && childs.size() > 0) {
    if (aParent instanceof Scope && !(aParent instanceof AstRoot)) {
      Scope scope=(Scope)aParent;
      scope.setParentScope(scopeStack.peek());
      scopeStack.push(scope);
    }
    try {
      for (      Node node : childs) {
        if (node instanceof Name) {
          node.setScope(scopeStack.peek());
        }
        recursiveScopeSetup(aTree,node);
      }
    }
  finally {
      if (aParent instanceof Scope && !(aParent instanceof AstRoot)) {
        scopeStack.pop();
      }
    }
  }
}

Fixed version (ground truth):
private void recursiveScopeSetup(Map<Node,List<Node>> aTree,Node aParent){
  List<Node> children=aTree.get(aParent);
  if (children != null && children.size() > 0) {
    if (aParent instanceof Scope && !(aParent instanceof AstRoot)) {
      Scope scope=(Scope)aParent;
      scope.setParentScope(scopeStack.peek());
      scopeStack.push(scope);
    }
    try {
      for (      Node node : children) {
        if (node instanceof Name) {
          node.setScope(scopeStack.peek());
        }
        recursiveScopeSetup(aTree,node);
      }
    }
  finally {
      if (aParent instanceof Scope && !(aParent instanceof AstRoot)) {
        scopeStack.pop();
      }
    }
  }
}
Program: 145628
Project: 145628
Buggy source:
public Object send(PositioningPacket aPacket,String aHost,Integer aPort,String aProtocolName){
  if (aHost != null && !aHost.isEmpty() && aProtocolName != null && !aProtocolName.isEmpty() && aPort != null && aPort > 0 && aPort < 65535 && aPacket != null) {
    if (RetranslatePacketFactory.isServiceSupport(aProtocolName)) {
      String imei=aPacket.getImei();
      IoSession ioSession=retranslateSessions.get(imei);
      if (ioSession == null) {
        IoConnector connector=new NioSocketConnector();
        connector.getFilterChain().addLast(aProtocolName,new ProtocolCodecFilter(RetranslatePacketFactory.getPacketEncoder(aProtocolName),RetranslatePacketFactory.getPacketDecoder(aProtocolName)));
        connector.setHandler(RetranslatePacketFactory.getPacketHandler(aProtocolName,retranslateSessions));
        ConnectFuture future=connector.connect(new InetSocketAddress(aHost,aPort));
        future.awaitUninterruptibly();
        if (future.isConnected()) {
          IoSession session=future.getSession();
          session.setAttribute(IMEI_ATTRIBUTE,imei);
          retranslateSessions.put(imei,session);
          WriteFuture write=session.write(aPacket);
          write.awaitUninterruptibly(WAIT_SEND_TIMEOUT);
        }
      }
 else {
        WriteFuture write=ioSession.write(aPacket);
        write.awaitUninterruptibly(WAIT_SEND_TIMEOUT);
      }
    }
  }
  return null;
}

Fixed version (ground truth):
public Object send(PositioningPacket aPacket,String aHost,Integer aPort,String aProtocolName){
  if (aHost != null && !aHost.isEmpty() && aProtocolName != null && !aProtocolName.isEmpty() && aPort != null && aPort > 0 && aPort < 65535 && aPacket != null) {
    if (RetranslatePacketFactory.isProtocolSupported(aProtocolName)) {
      String imei=aPacket.getImei();
      IoSession ioSession=retranslateSessions.get(imei);
      if (ioSession == null) {
        IoConnector connector=new NioSocketConnector();
        connector.getFilterChain().addLast(aProtocolName,new ProtocolCodecFilter(RetranslatePacketFactory.getPacketEncoder(aProtocolName),RetranslatePacketFactory.getPacketDecoder(aProtocolName)));
        connector.setHandler(RetranslatePacketFactory.getPacketHandler(aProtocolName,retranslateSessions));
        connector.setConnectTimeoutMillis(WAIT_SEND_TIMEOUT);
        ConnectFuture future=connector.connect(new InetSocketAddress(aHost,aPort));
        future.awaitUninterruptibly();
        if (future.isConnected()) {
          IoSession session=future.getSession();
          session.setAttribute(IMEI_ATTRIBUTE,imei);
          retranslateSessions.put(imei,session);
          WriteFuture write=session.write(aPacket);
          write.awaitUninterruptibly(WAIT_SEND_TIMEOUT);
        }
 else         connector.dispose();
      }
 else {
        WriteFuture write=ioSession.write(aPacket);
        write.awaitUninterruptibly(WAIT_SEND_TIMEOUT);
      }
    }
  }
  return null;
}
Program: 145629
Project: 145629
Buggy source:
@Test public void testSimpleConnecting() throws UnknownHostException, IOException {
  PacketReciever reciever=((PositioningIoHandler)server.getSensorAcceptor().getHandler()).getReciever();
  try {
    Calendar cl=Calendar.getInstance();
    cl.set(2012,7,5,10,20,30);
    for (int i=0; i < 20; i++) {
      PositioningPacket ps=new PositioningPacket();
      ps.setImei("String_Node_Str");
      ps.setAltitude(23.56f);
      ps.setAzimuth(33.56f);
      ps.setLongtitude(123.56f);
      ps.setLatitude(63.56f);
      ps.setSpeed(123.6f);
      ps.setValidity(true);
      ps.setTime(cl.getTime());
      reciever.received(ps);
      cl.roll(Calendar.MINUTE,i * 2);
    }
  }
 catch (  Exception ex) {
    Logger.getLogger(PlatypusServerRecivedPacketTest.class.getName()).log(Level.SEVERE,null,ex);
    fail(ex.getMessage());
  }
  try {
    Thread.sleep(3 * 1000);
  }
 catch (  InterruptedException ex) {
    Logger.getLogger(PlatypusServerRecivedPacketTest.class.getName()).log(Level.SEVERE,null,ex);
  }
  assertTrue(((PositioningPacketReciever)reciever).getPacketStorage().isEmpty());
}

Fixed version (ground truth):
@Test public void testSimpleConnecting() throws UnknownHostException, IOException {
  PacketReciever reciever=null;
  try {
    Calendar cl=Calendar.getInstance();
    cl.set(2012,7,5,10,20,30);
    for (int i=0; i < 20; i++) {
      PositioningPacket ps=new PositioningPacket();
      ps.setImei("String_Node_Str");
      ps.setAltitude(23.56f);
      ps.setAzimuth(33.56f);
      ps.setLongtitude(123.56f);
      ps.setLatitude(63.56f);
      ps.setSpeed(123.6f);
      ps.setValidity(true);
      ps.setTime(cl.getTime());
      reciever.received(ps);
      cl.roll(Calendar.MINUTE,i * 2);
    }
  }
 catch (  Exception ex) {
    Logger.getLogger(PlatypusServerRecivedPacketTest.class.getName()).log(Level.SEVERE,null,ex);
    fail(ex.getMessage());
  }
  try {
    Thread.sleep(3 * 1000);
  }
 catch (  InterruptedException ex) {
    Logger.getLogger(PlatypusServerRecivedPacketTest.class.getName()).log(Level.SEVERE,null,ex);
  }
  assertTrue(((PositioningPacketReciever)reciever).getPacketStorage().isEmpty());
}
Program: 145630
Project: 145630
Buggy source:
@BeforeClass public static void setUpClass() throws Exception {
  String url="String_Node_Str";
  String login="String_Node_Str";
  String passwd="String_Node_Str";
  if (!url.startsWith("String_Node_Str")) {
    throw new Exception("String_Node_Str" + url);
  }
  DbConnectionSettings settings=new DbConnectionSettings();
  settings.setUrl(url);
  settings.getInfo().setProperty("String_Node_Str",login);
  settings.getInfo().setProperty("String_Node_Str",passwd);
  SSLContext sslContext=ServerMain.createSSLContext();
  server=new PlatypusServer(new DatabasesClient(settings),sslContext,new InetSocketAddress[]{new InetSocketAddress("String_Node_Str",TEST_PORT)},new HashMap<Integer,String>(),new HashSet<ModuleConfig>(),null);
  server.start();
}

Fixed version (ground truth):
@BeforeClass public static void setUpClass() throws Exception {
  String url="String_Node_Str";
  String login="String_Node_Str";
  String passwd="String_Node_Str";
  if (!url.startsWith("String_Node_Str")) {
    throw new Exception("String_Node_Str" + url);
  }
  DbConnectionSettings settings=new DbConnectionSettings();
  settings.setUrl(url);
  settings.getInfo().setProperty("String_Node_Str",login);
  settings.getInfo().setProperty("String_Node_Str",passwd);
  SSLContext sslContext=ServerMain.createSSLContext();
  server=new PlatypusServer(new DatabasesClient(settings),sslContext,new InetSocketAddress[]{new InetSocketAddress("String_Node_Str",TEST_PORT)},new HashMap<Integer,String>(),new HashSet<String>(),null);
  server.start();
}
Program: 145631
Project: 145631
Buggy source:
private Field resolveFieldByColumn(SqlQuery aQuery,Column column,SelectExpressionItem selectItem,Map<String,Table> tables) throws Exception {
  Table fromTable=null;
  Field field=null;
  if (column.getTable() != null && column.getTable().getWholeTableName() != null) {
    fromTable=tables.get(column.getTable().getWholeTableName().toLowerCase());
    if (fromTable != null) {
      Fields fields=getTableFields(aQuery.getDbId(),fromTable);
      field=fields.get(column.getColumnName());
    }
  }
  if (field == null) {
    for (    Table table : tables.values()) {
      Fields fields=getTableFields(aQuery.getDbId(),table);
      field=fields.get(column.getColumnName());
      if (field != null) {
        fromTable=table;
        break;
      }
    }
  }
  if (field != null) {
    Field copied=field.copy();
    dbMdCache.getConnectionDriver().getTypesResolver().resolve2Application(copied);
    copied.setName(selectItem.getAlias() != null ? selectItem.getAlias().getName() : column.getColumnName());
    copied.setOriginalName(column.getColumnName() != null ? column.getColumnName() : copied.getName());
    if (preserveDatasources) {
      boolean aliasPresent=fromTable.getAlias() != null && !fromTable.getAlias().getName().isEmpty();
      if (aliasPresent) {
        copied.setTableName(fromTable.getAlias().getName());
        copied.setSchemaName(null);
      }
 else {
        copied.setTableName(fromTable.getName());
        copied.setSchemaName(fromTable.getSchemaName());
      }
    }
    return copied;
  }
 else {
    return null;
  }
}

Fixed version (ground truth):
private Field resolveFieldByColumn(SqlQuery aQuery,Column column,SelectExpressionItem selectItem,Map<String,Table> tables) throws Exception {
  Table fromTable=null;
  Field field=null;
  if (column.getTable() != null && column.getTable().getWholeTableName() != null) {
    fromTable=tables.get(column.getTable().getWholeTableName().toLowerCase());
    if (fromTable != null) {
      Fields fields=getTableFields(aQuery.getDbId(),fromTable);
      field=fields.get(column.getColumnName());
    }
  }
  if (field == null) {
    for (    Table table : tables.values()) {
      Fields fields=getTableFields(aQuery.getDbId(),table);
      field=fields.get(column.getColumnName());
      if (field != null) {
        fromTable=table;
        break;
      }
    }
  }
  if (field != null) {
    Field copied=field.copy();
    copied.setName(selectItem.getAlias() != null ? selectItem.getAlias().getName() : column.getColumnName());
    copied.setOriginalName(column.getColumnName() != null ? column.getColumnName() : copied.getName());
    if (preserveDatasources) {
      boolean aliasPresent=fromTable.getAlias() != null && !fromTable.getAlias().getName().isEmpty();
      if (aliasPresent) {
        copied.setTableName(fromTable.getAlias().getName());
        copied.setSchemaName(null);
      }
 else {
        copied.setTableName(fromTable.getName());
        copied.setSchemaName(fromTable.getSchemaName());
      }
    }
    return copied;
  }
 else {
    return null;
  }
}
Program: 145632
Project: 145632
Buggy source:
public void addTableFieldsToSelectResults(SqlQuery aQuery,Table table) throws Exception {
  Fields fields=getTableFields(aQuery.getDbId(),table);
  if (fields != null) {
    for (    Field field : fields.toCollection()) {
      Field copied=field.copy();
      dbMdCache.getConnectionDriver().getTypesResolver().resolve2Application(copied);
      if (preserveDatasources) {
        boolean aliasPresent=table.getAlias() != null && !table.getAlias().getName().isEmpty();
        if (aliasPresent) {
          copied.setTableName(table.getAlias().getName());
          copied.setSchemaName(null);
        }
 else {
          copied.setTableName(table.getName());
          copied.setSchemaName(table.getSchemaName());
        }
      }
      aQuery.getFields().add(copied);
    }
  }
}

Fixed version (ground truth):
public void addTableFieldsToSelectResults(SqlQuery aQuery,Table table) throws Exception {
  Fields fields=getTableFields(aQuery.getDbId(),table);
  if (fields != null) {
    for (    Field field : fields.toCollection()) {
      Field copied=field.copy();
      if (preserveDatasources) {
        boolean aliasPresent=table.getAlias() != null && !table.getAlias().getName().isEmpty();
        if (aliasPresent) {
          copied.setTableName(table.getAlias().getName());
          copied.setSchemaName(null);
        }
 else {
          copied.setTableName(table.getName());
          copied.setSchemaName(table.getSchemaName());
        }
      }
      aQuery.getFields().add(copied);
    }
  }
}
Program: 145633
Project: 145633
Buggy source:
@Override public Object call(final Context cx,Scriptable scope,Scriptable thisObj,final Object[] args){
  try {
    if (args != null && args.length > 0 && args[args.length - 1] instanceof Function) {
      final Function callback=(Function)args[args.length - 1];
      EventQueue.invokeLater(new Runnable(){
        @Override public void run(){
          try {
            Object result=platypusClient.executeServerModuleMethod(moduleName,methodName,Arrays.copyOf(args,args.length - 1));
            callback.call(cx,StubFunction.this,StubFunction.this,new Object[]{result});
          }
 catch (          Exception ex) {
            Logger.getLogger(ServerScriptProxy.class.getName()).log(Level.SEVERE,null,ex);
          }
        }
      }
);
      return Context.getUndefinedValue();
    }
 else {
      return platypusClient.executeServerModuleMethod(moduleName,methodName,args);
    }
  }
 catch (  Exception ex) {
    throw new RuntimeException(ex);
  }
}

Fixed version (ground truth):
@Override public Object call(final Context cx,Scriptable scope,Scriptable thisObj,final Object[] args){
  try {
    if (args != null && args.length > 0 && args[args.length - 1] instanceof Function) {
      final Function callback=(Function)args[args.length - 1];
      EventQueue.invokeLater(new Runnable(){
        @Override public void run(){
          try {
            Object result=platypusClient.executeServerModuleMethod(moduleName,methodName,Arrays.copyOf(args,args.length - 1));
            Context cx=Context.getCurrentContext();
            boolean wasContext=cx != null;
            if (!wasContext) {
              cx=ScriptUtils.enterContext();
            }
            try {
              callback.call(cx,StubFunction.this,StubFunction.this,new Object[]{result});
            }
  finally {
              if (!wasContext) {
                Context.exit();
              }
            }
          }
 catch (          Exception ex) {
            Logger.getLogger(ServerScriptProxy.class.getName()).log(Level.SEVERE,null,ex);
          }
        }
      }
);
      return Context.getUndefinedValue();
    }
 else {
      return platypusClient.executeServerModuleMethod(moduleName,methodName,args);
    }
  }
 catch (  Exception ex) {
    throw new RuntimeException(ex);
  }
}
Program: 145634
Project: 145634
Buggy source:
@Override public void run(){
  try {
    Object result=platypusClient.executeServerModuleMethod(moduleName,methodName,Arrays.copyOf(args,args.length - 1));
    callback.call(cx,StubFunction.this,StubFunction.this,new Object[]{result});
  }
 catch (  Exception ex) {
    Logger.getLogger(ServerScriptProxy.class.getName()).log(Level.SEVERE,null,ex);
  }
}

Fixed version (ground truth):
@Override public void run(){
  try {
    Object result=platypusClient.executeServerModuleMethod(moduleName,methodName,Arrays.copyOf(args,args.length - 1));
    Context cx=Context.getCurrentContext();
    boolean wasContext=cx != null;
    if (!wasContext) {
      cx=ScriptUtils.enterContext();
    }
    try {
      callback.call(cx,StubFunction.this,StubFunction.this,new Object[]{result});
    }
  finally {
      if (!wasContext) {
        Context.exit();
      }
    }
  }
 catch (  Exception ex) {
    Logger.getLogger(ServerScriptProxy.class.getName()).log(Level.SEVERE,null,ex);
  }
}
Program: 145635
Project: 145635
Buggy source:
private Component createDropDownButton(Element aTag) throws Exception {
  final SplitButton component=new SplitButton();
  processEvents(component,aTag);
  Publisher.publish(component);
  setIconAndAlign(component,aTag);
  if (aTag.hasAttribute("String_Node_Str"))   component.setText(aTag.getAttribute("String_Node_Str"));
  if (aTag.hasAttribute("String_Node_Str")) {
    final String dropDownMenu=aTag.getAttribute("String_Node_Str");
    postponedTasks.add(new Runnable(){
      @Override public void run(){
        Component comp=components.get(dropDownMenu);
        if (comp instanceof Menu)         component.setMenu((Menu)comp);
 else         Logger.getLogger(GxtControlsFactory.class.getName()).log(Level.WARNING,"String_Node_Str" + component.getData(Form.PID_DATA_KEY));
      }
    }
);
  }
  checkBorders(component,aTag);
  PublishedComponent publishedComp=(PublishedComponent)component.getData(Form.PUBLISHED_DATA_KEY);
  processGeneralProperties(component,aTag,publishedComp);
  return component;
}

Fixed version (ground truth):
private Component createDropDownButton(Element aTag) throws Exception {
  final SplitButton component=new SplitButton(){
    @Override protected void onRedraw(){
      super.onRedraw();
      ControlsUtils.reapplyStyle(this);
    }
  }
;
  processEvents(component,aTag);
  PublishedComponent publishedComp=Publisher.publish(component);
  if (aTag.hasAttribute("String_Node_Str"))   component.setText(aTag.getAttribute("String_Node_Str"));
  if (aTag.hasAttribute("String_Node_Str")) {
    final String dropDownMenu=aTag.getAttribute("String_Node_Str");
    postponedTasks.add(new Runnable(){
      @Override public void run(){
        Component comp=components.get(dropDownMenu);
        if (comp instanceof Menu)         component.setMenu((Menu)comp);
 else         Logger.getLogger(GxtControlsFactory.class.getName()).log(Level.WARNING,"String_Node_Str" + component.getData(Form.PID_DATA_KEY));
      }
    }
);
  }
  checkBorders(component,aTag);
  processGeneralProperties(component,aTag,publishedComp);
  setIconAndAlign(component,aTag,publishedComp);
  return component;
}
Program: 145637
Project: 145637
Buggy source:
private Component createToggleButton(Element aTag) throws Exception {
  PlatypusToggleButton component=new PlatypusToggleButton();
  processEvents(component,aTag);
  Publisher.publish(component);
  if (aTag.hasAttribute("String_Node_Str"))   component.setText(aTag.getAttribute("String_Node_Str"));
  if (aTag.hasAttribute("String_Node_Str"))   addToToggleGroup(component,aTag.getAttribute("String_Node_Str"));
  component.setValue(Utils.getBooleanAttribute(aTag,"String_Node_Str",false));
  setIconAndAlign(component,aTag);
  checkBorders(component,aTag);
  PublishedComponent publishedComp=(PublishedComponent)component.getData(Form.PUBLISHED_DATA_KEY);
  processGeneralProperties(component,aTag,publishedComp);
  return component;
}

Fixed version (ground truth):
private Component createToggleButton(Element aTag) throws Exception {
  PlatypusToggleButton component=new PlatypusToggleButton(){
    @Override protected void onRedraw(){
      super.onRedraw();
      ControlsUtils.reapplyStyle(this);
    }
  }
;
  processEvents(component,aTag);
  PublishedComponent publishedComp=Publisher.publish(component);
  if (aTag.hasAttribute("String_Node_Str"))   component.setText(aTag.getAttribute("String_Node_Str"));
  if (aTag.hasAttribute("String_Node_Str"))   addToToggleGroup(component,aTag.getAttribute("String_Node_Str"));
  component.setValue(Utils.getBooleanAttribute(aTag,"String_Node_Str",false));
  processGeneralProperties(component,aTag,publishedComp);
  setIconAndAlign(component,aTag,publishedComp);
  checkBorders(component,aTag);
  return component;
}
Program: 145638
Project: 145638
Buggy source:
private Component createButton(Element aTag) throws Exception {
  TextButton component=new TextButton();
  processEvents(component,aTag);
  Publisher.publish(component);
  setIconAndAlign(component,aTag);
  if (aTag.hasAttribute("String_Node_Str"))   component.setText(aTag.getAttribute("String_Node_Str"));
  checkBorders(component,aTag);
  PublishedComponent publishedComp=(PublishedComponent)component.getData(Form.PUBLISHED_DATA_KEY);
  processGeneralProperties(component,aTag,publishedComp);
  return component;
}

Fixed version (ground truth):
private Component createButton(Element aTag) throws Exception {
  final TextButton component=new TextButton(){
    @Override protected void onRedraw(){
      super.onRedraw();
      ControlsUtils.reapplyStyle(this);
    }
  }
;
  processEvents(component,aTag);
  PublishedComponent publishedComp=Publisher.publish(component);
  if (aTag.hasAttribute("String_Node_Str"))   component.setText(aTag.getAttribute("String_Node_Str"));
  checkBorders(component,aTag);
  processGeneralProperties(component,aTag,publishedComp);
  setIconAndAlign(component,aTag,publishedComp);
  return component;
}
Program: 145640
Project: 145640
Buggy source:
public String getLeftPartNameType(Integer aSqlType){
  String partName=jdbcTypesLeftPartName.get(aSqlType);
  if (partName == null)   partName=jdbcTypes2RdbmsTypes.get(aSqlType);
  return partName;
}

Fixed version (ground truth):
public String getLeftPartNameType(Integer aSqlType){
  String partName=jdbcTypesLeftPartName.get(aSqlType);
  if (partName == null) {
    partName=jdbcTypes2RdbmsTypes.get(aSqlType);
  }
  return partName;
}
Program: 145641
Project: 145641
Buggy source:
@Override public int getJdbcTypeByRDBMSTypename(String aTypeName){
  String sqlTypeName=(aTypeName != null ? aTypeName.toUpperCase() : null);
  int leftIndex=sqlTypeName.indexOf("String_Node_Str");
  if (leftIndex > 0) {
    int rightIndex=sqlTypeName.indexOf("String_Node_Str");
    if (rightIndex > 0)     sqlTypeName=sqlTypeName.substring(0,leftIndex) + "String_Node_Str" + sqlTypeName.substring(rightIndex + 1);
  }
  StringTokenizer st=new StringTokenizer(sqlTypeName,"String_Node_Str",false);
  StringBuilder sb=new StringBuilder();
  while (st.hasMoreTokens()) {
    String part=st.nextToken();
    if (part != null && !part.isEmpty())     sb.append(part).append("String_Node_Str");
  }
  sqlTypeName=sb.toString().trim();
  Integer jdbcType=rdbmsTypes2JdbcTypes.get(sqlTypeName);
  if (jdbcType == null) {
    jdbcType=Types.OTHER;
    if (isGeometryTypeName(sqlTypeName)) {
      jdbcType=Types.STRUCT;
    }
  }
  return jdbcType;
}

Fixed version (ground truth):
@Override public int getJdbcTypeByRDBMSTypename(String aTypeName){
  String sqlTypeName=(aTypeName != null ? aTypeName.toUpperCase() : null);
  int leftIndex=sqlTypeName.indexOf("String_Node_Str");
  if (leftIndex > 0) {
    int rightIndex=sqlTypeName.indexOf("String_Node_Str");
    if (rightIndex > 0) {
      sqlTypeName=sqlTypeName.substring(0,leftIndex) + "String_Node_Str" + sqlTypeName.substring(rightIndex + 1);
    }
  }
  StringTokenizer st=new StringTokenizer(sqlTypeName,"String_Node_Str",false);
  StringBuilder sb=new StringBuilder();
  while (st.hasMoreTokens()) {
    String part=st.nextToken();
    if (part != null && !part.isEmpty()) {
      sb.append(part).append("String_Node_Str");
    }
  }
  sqlTypeName=sb.toString().trim();
  Integer jdbcType=rdbmsTypes2JdbcTypes.get(sqlTypeName);
  if (jdbcType == null) {
    jdbcType=Types.OTHER;
    if (isGeometryTypeName(sqlTypeName)) {
      jdbcType=Types.STRUCT;
    }
  }
  return jdbcType;
}
Program: 145642
Project: 145642
Buggy source:
@Override public void resolve2Application(Field aField){
  if (aField != null) {
    int lSize=aField.getSize();
    int size=lSize >> 16;
    int scale=(lSize << 16) >> 16;
    if (SQLUtils.isSameTypeGroup(aField.getTypeInfo().getSqlType(),java.sql.Types.VARCHAR)) {
      if (scale > 0) {
        aField.setSize(scale);
      }
 else {
        aField.setSize(0);
      }
      aField.setScale(0);
      aField.setPrecision(0);
    }
 else {
      if (size > 0) {
        aField.setSize(size);
      }
 else {
        aField.setSize(0);
      }
      if (scale > 0) {
        aField.setScale(scale);
        aField.setPrecision(scale);
      }
 else {
        aField.setScale(0);
        aField.setPrecision(0);
      }
    }
  }
}

Fixed version (ground truth):
@Override public void resolve2Application(Field aField){
  if (aField != null) {
    int lSize=aField.getSize();
    int size=lSize >> 16;
    int scale=(lSize << 16) >> 16;
    if (SQLUtils.isSameTypeGroup(aField.getTypeInfo().getSqlType(),java.sql.Types.VARCHAR)) {
      aField.setSize(Math.max(0,scale));
      aField.setScale(0);
      aField.setPrecision(0);
    }
 else     if (SQLUtils.isSameTypeGroup(aField.getTypeInfo().getSqlType(),java.sql.Types.BLOB)) {
      aField.setTypeInfo(DataTypeInfo.BLOB);
      aField.setSize(Math.max(0,size));
    }
 else {
      aField.setSize(Math.max(0,size));
      if (scale > 0) {
        aField.setScale(scale);
        aField.setPrecision(scale);
      }
 else {
        aField.setScale(0);
        aField.setPrecision(0);
      }
    }
  }
}
Program: 145644
Project: 145644
Buggy source:
public void putTableFieldsMetadata(SqlQuery aQuery) throws Exception {
  CCJSqlParserManager parserManager=new CCJSqlParserManager();
  Statement parsedQuery=parserManager.parse(new StringReader(aQuery.getSqlText()));
  if (parsedQuery instanceof Select) {
    Select select=(Select)parsedQuery;
    Map<String,Table> tables=TablesFinder.getTablesMap(TablesFinder.TO_CASE.LOWER,select,false);
    resolveOutputFieldsFromTables(aQuery,select,tables);
  }
}

Fixed version (ground truth):
/** 
 * @param aQuery
 * @return True if query is select query.
 * @throws Exception
 */
public boolean putTableFieldsMetadata(SqlQuery aQuery) throws Exception {
  CCJSqlParserManager parserManager=new CCJSqlParserManager();
  Statement parsedQuery=parserManager.parse(new StringReader(aQuery.getSqlText()));
  if (parsedQuery instanceof Select) {
    Select select=(Select)parsedQuery;
    Map<String,Table> tables=TablesFinder.getTablesMap(TablesFinder.TO_CASE.LOWER,select,false);
    resolveOutputFieldsFromTables(aQuery,select,tables);
    return true;
  }
  return false;
}
Program: 145645
Project: 145645
Buggy source:
final public Drop Drop() throws ParseException {
  Drop drop=new Drop();
  Token tk=null;
  List dropArgs=new ArrayList();
  List commentArgs=new ArrayList();
  tk=jj_consume_token(K_DROP);
  if (tk.specialToken != null) {
    drop.setComment(tk.specialToken.image);
  }
switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) {
case S_IDENTIFIER:
    tk=jj_consume_token(S_IDENTIFIER);
  break;
case K_TABLE:
tk=jj_consume_token(K_TABLE);
break;
case K_INDEX:
tk=jj_consume_token(K_INDEX);
break;
default :
jj_la1[162]=jj_gen;
jj_consume_token(-1);
throw new ParseException();
}
drop.setType(tk.image);
if (tk.specialToken != null) {
drop.setTypeComment(tk.specialToken.image);
}
tk=jj_consume_token(S_IDENTIFIER);
if (tk.specialToken != null) {
drop.setNameComment(tk.specialToken.image);
}
drop.setName(tk.image);
label_35: while (true) {
switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) {
case S_IDENTIFIER:
;
break;
default :
jj_la1[163]=jj_gen;
break label_35;
}
tk=jj_consume_token(S_IDENTIFIER);
if (tk.specialToken != null) {
commentArgs.add(tk.specialToken.image);
}
 else {
commentArgs.add("String_Node_Str");
}
dropArgs.add(tk.image);
}
if (dropArgs.size() > 0) {
drop.setParameters(dropArgs);
drop.setParametrsComment(commentArgs);
}
{
if (true) return drop;
}
throw new Error("String_Node_Str");
}

Fixed version (ground truth):
final public Drop Drop() throws ParseException {
  Drop drop=new Drop();
  Token tk=null;
  List dropArgs=new ArrayList();
  List commentArgs=new ArrayList();
  tk=jj_consume_token(K_DROP);
  if (tk.specialToken != null) {
    drop.setComment(tk.specialToken.image);
  }
switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) {
case S_IDENTIFIER:
    tk=jj_consume_token(S_IDENTIFIER);
  break;
case K_TABLE:
tk=jj_consume_token(K_TABLE);
break;
case K_INDEX:
tk=jj_consume_token(K_INDEX);
break;
default :
jj_la1[162]=jj_gen;
jj_consume_token(-1);
throw new ParseException();
}
drop.setType(tk.image);
if (tk.specialToken != null) {
drop.setTypeComment(tk.specialToken.image);
}
tk=jj_consume_token(S_IDENTIFIER);
if (tk.specialToken != null) {
drop.setNameComment(tk.specialToken.image);
}
drop.setName(tk.image);
label_35: while (true) {
switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) {
case S_IDENTIFIER:
;
break;
default :
jj_la1[163]=jj_gen;
break label_35;
}
tk=jj_consume_token(S_IDENTIFIER);
if (tk.specialToken != null) {
commentArgs.add(tk.specialToken.image);
}
 else {
commentArgs.add("String_Node_Str");
}
dropArgs.add(tk.image);
}
if (dropArgs.size() > 0) {
drop.setParameters(dropArgs);
drop.setParametersComment(commentArgs);
}
{
if (true) return drop;
}
throw new Error("String_Node_Str");
}
Program: 145646
Project: 145646
Buggy source:
private Connector convertPath2Connector(Point aStartPoint,Point aEndPoint,List<Vertex<PathFragment>> aPath){
  List<Point> points=new ArrayList<>();
  rleAdd(points,aStartPoint);
  boolean fallback=true;
  if (aPath != null && aPath.size() > 1) {
    fallback=false;
    Point prevPt=aStartPoint;
    Vertex<PathFragment> prevV=aPath.get(0);
    for (int i=1; i < aPath.size(); i++) {
      Vertex<PathFragment> v=aPath.get(i);
      Point pt=new Point();
      calcNextPoint(aStartPoint,aEndPoint,prevV,v,pt);
      Point pt0=new Point(prevPt.x,pt.y);
      rleAdd(points,pt0);
      rleAdd(points,pt);
      prevPt=pt;
      prevV=v;
    }
  }
 else {
    rleAdd(points,new Point((aStartPoint.x + aEndPoint.x) / 2,aStartPoint.y));
    rleAdd(points,new Point((aStartPoint.x + aEndPoint.x) / 2,aEndPoint.y));
  }
  rleAdd(points,aEndPoint);
  Connector connector=pointsToConnector(points);
  connector.setFalled(fallback);
  return connector;
}

Fixed version (ground truth):
private Connector convertPath2Connector(Point aStartPoint,Point aEndPoint,List<Vertex<PathFragment>> aPath){
  List<Point> points=new ArrayList<>();
  rleAdd(points,aStartPoint);
  boolean fallback=true;
  if (aPath != null && aPath.size() > 1) {
    fallback=false;
    Point prevPt=aStartPoint;
    Vertex<PathFragment> prevV=aPath.get(0);
    for (int i=1; i < aPath.size(); i++) {
      Vertex<PathFragment> v=aPath.get(i);
      Point pt=new Point();
      calcNextPoint(aStartPoint,aEndPoint,prevV,v,pt);
      v.attribute.point=pt;
      Point pt0=new Point(prevPt.x,pt.y);
      rleAdd(points,pt0);
      rleAdd(points,pt);
      prevPt=pt;
      prevV=v;
    }
  }
 else {
    rleAdd(points,new Point((aStartPoint.x + aEndPoint.x) / 2,aStartPoint.y));
    rleAdd(points,new Point((aStartPoint.x + aEndPoint.x) / 2,aEndPoint.y));
  }
  rleAdd(points,aEndPoint);
  Connector connector=pointsToConnector(points);
  connector.setFalled(fallback);
  return connector;
}
Program: 145647
Project: 145647
Buggy source:
protected void preparePaths(){
  if (needRerouteConnectors) {
    Set<Rectangle> obstacles=new HashSet<>();
    for (    EntityView<E> eView : entityViews.values()) {
      obstacles.add(eView.getBounds());
    }
    QuadTree<Vertex<PathFragment>> verticesIndex=new QuadTree<>();
    List<Vertex<PathFragment>> graph=Sweeper.build(getWidth(),getHeight(),obstacles,verticesIndex);
    paths=new Paths(graph,verticesIndex);
  }
}

Fixed version (ground truth):
protected void preparePaths(){
  if (needRerouteConnectors) {
    Set<Rectangle> obstacles=new HashSet<>();
    for (    EntityView<E> eView : entityViews.values()) {
      obstacles.add(eView.getBounds());
    }
    QuadTree<Vertex<PathFragment>> verticesIndex=new QuadTree<>();
    graph=Sweeper.build(getWidth(),getHeight(),obstacles,verticesIndex);
    paths=new Paths(graph,verticesIndex);
  }
}
Program: 145648
Project: 145648
Buggy source:
@Override protected void paintChildren(Graphics g){
  super.paintChildren(g);
  if (g instanceof Graphics2D) {
    Graphics2D g2d=(Graphics2D)g;
    paintConnectors(g2d,model.getRelations(),connectorsStroke);
    Color old2FieldColor=toFieldConnectorColor;
    toFieldConnectorColor=toFieldConnectorColor.darker();
    Color old2ParameterColor=toParameterConnectorColor;
    toParameterConnectorColor=toParameterConnectorColor.darker();
    try {
      paintConnectors(g2d,selectedRelations,selectedConnectorsStroke);
      paintConnectors(g2d,hittedRelations,hittedConnectorsStroke);
    }
  finally {
      toFieldConnectorColor=old2FieldColor;
      toParameterConnectorColor=old2ParameterColor;
    }
  }
}

Fixed version (ground truth):
@Override protected void paintChildren(Graphics g){
  if (routingDebug) {
    Color oldColor=g.getColor();
    try {
      for (      EntityView<?> eView : entityViews.values()) {
        Rectangle o=eView.getBounds();
        g.setColor(obstaclesColor);
        g.fillRect(o.x,o.y,o.width,o.height);
        g.setColor(obstaclesColor.brighter());
        g.drawRect(o.x,o.y,o.width,o.height);
      }
      if (graph != null) {
        for (        Vertex<PathFragment> vertex : graph) {
          g.setColor(spaceColor);
          g.fillRect(vertex.attribute.rect.x,vertex.attribute.rect.y,vertex.attribute.rect.width,vertex.attribute.rect.height);
          g.setColor(spaceColor.brighter().brighter());
          g.drawRect(vertex.attribute.rect.x,vertex.attribute.rect.y,vertex.attribute.rect.width,vertex.attribute.rect.height);
        }
        for (        Vertex<PathFragment> vertex : graph) {
          for (          Vertex<PathFragment> ajacent : vertex.getAjacent()) {
            g.setColor(edgeColor);
            Rectangle startRect=vertex.attribute.rect;
            Rectangle endRect=ajacent.attribute.rect;
            g.drawLine(startRect.x + startRect.width / 2,startRect.y + startRect.height / 2,endRect.x + endRect.width / 2,endRect.y + endRect.height / 2);
          }
        }
      }
    }
  finally {
      g.setColor(oldColor);
    }
  }
  super.paintChildren(g);
  if (g instanceof Graphics2D) {
    Graphics2D g2d=(Graphics2D)g;
    paintConnectors(g2d,model.getRelations(),connectorsStroke);
    Color old2FieldColor=toFieldConnectorColor;
    toFieldConnectorColor=toFieldConnectorColor.darker();
    Color old2ParameterColor=toParameterConnectorColor;
    toParameterConnectorColor=toParameterConnectorColor.darker();
    try {
      paintConnectors(g2d,selectedRelations,selectedConnectorsStroke);
      paintConnectors(g2d,hittedRelations,hittedConnectorsStroke);
    }
  finally {
      toFieldConnectorColor=old2FieldColor;
      toParameterConnectorColor=old2ParameterColor;
    }
  }
}
Program: 145649
Project: 145649
Buggy source:
/** 
 * Sets client type to be run.
 * @param aValue ClientType instance
 */
public void setRunClientType(ClientType aValue){
  ClientType oldValue=getRunClientType();
  projectPrivateProperties.setProperty(CLIENT_TYPE_KEY,aValue.getId());
  projectPrivatePropertiesIsDirty=true;
  changeSupport.firePropertyChange(CLIENT_TYPE_KEY,aValue,oldValue);
}

Fixed version (ground truth):
/** 
 * Sets client type to be run.
 * @param aValue ClientType instance
 */
public void setRunClientType(ClientType aValue){
  ClientType oldValue=getRunClientType();
  if (aValue != null) {
    projectPrivateProperties.setProperty(CLIENT_TYPE_KEY,aValue.getId());
  }
 else {
    projectPrivateProperties.remove(CLIENT_TYPE_KEY);
  }
  projectPrivatePropertiesIsDirty=true;
  changeSupport.firePropertyChange(CLIENT_TYPE_KEY,aValue,oldValue);
}
Program: 145650
Project: 145650
Buggy source:
/** 
 * Sets optional parameters provided to Platypus Application Server.
 * @param aValue
 */
public void setServerOptions(String aValue){
  String oldValue=getRunServerOptions();
  projectPrivateProperties.setProperty(RUN_SERVER_OPTIONS_KEY,aValue);
  projectPrivatePropertiesIsDirty=true;
  changeSupport.firePropertyChange(RUN_SERVER_OPTIONS_KEY,oldValue,aValue);
}

Fixed version (ground truth):
/** 
 * Sets optional parameters provided to Platypus Application Server.
 * @param aValue
 */
public void setServerOptions(String aValue){
  String oldValue=getRunServerOptions();
  if (aValue != null) {
    projectPrivateProperties.setProperty(RUN_SERVER_OPTIONS_KEY,aValue);
  }
 else {
    projectPrivateProperties.remove(RUN_SERVER_OPTIONS_KEY);
  }
  projectPrivatePropertiesIsDirty=true;
  changeSupport.firePropertyChange(RUN_SERVER_OPTIONS_KEY,oldValue,aValue);
}
Program: 145651
Project: 145651
Buggy source:
/** 
 * Sets the project's display name.
 * @param aValue title for the project
 */
public void setDisplayName(String aValue){
  String oldValue=getDisplayName();
  projectProperties.setProperty(PROJECT_DISPLAY_NAME_KEY,aValue);
  projectPropertiesIsDirty=true;
  changeSupport.firePropertyChange(PROJECT_DISPLAY_NAME_KEY,oldValue,aValue);
}

Fixed version (ground truth):
/** 
 * Sets the project's display name.
 * @param aValue title for the project
 */
public void setDisplayName(String aValue){
  if (aValue == null) {
    throw new NullPointerException("String_Node_Str");
  }
  String oldValue=getDisplayName();
  projectProperties.setProperty(PROJECT_DISPLAY_NAME_KEY,aValue);
  projectPropertiesIsDirty=true;
  changeSupport.firePropertyChange(PROJECT_DISPLAY_NAME_KEY,oldValue,aValue);
}
Program: 145652
Project: 145652
Buggy source:
/** 
 * Sets username for the Platypus user to login on application run.
 * @param aValue Platypus user name
 */
public void setRunUser(String aValue){
  String oldValue=getRunUser();
  projectPrivateProperties.setProperty(RUN_USER_KEY,aValue);
  projectPrivatePropertiesIsDirty=true;
  changeSupport.firePropertyChange(RUN_USER_KEY,oldValue,aValue);
}

Fixed version (ground truth):
/** 
 * Sets username for the Platypus user to login on application run.
 * @param aValue Platypus user name
 */
public void setRunUser(String aValue){
  String oldValue=getRunUser();
  if (aValue != null) {
    projectPrivateProperties.setProperty(RUN_USER_KEY,aValue);
  }
 else {
    projectPrivateProperties.remove(RUN_USER_KEY);
  }
  projectPrivatePropertiesIsDirty=true;
  changeSupport.firePropertyChange(RUN_USER_KEY,oldValue,aValue);
}
Program: 145653
Project: 145653
Buggy source:
/** 
 * Sets optional parameters provided to Platypus Client.
 * @param aValue
 */
public void setClientOptions(String aValue){
  String oldValue=getRunClientOptions();
  projectPrivateProperties.setProperty(RUN_CLIENT_OPTIONS_KEY,aValue);
  projectPrivatePropertiesIsDirty=true;
  changeSupport.firePropertyChange(RUN_CLIENT_OPTIONS_KEY,oldValue,aValue);
}

Fixed version (ground truth):
/** 
 * Sets optional parameters provided to Platypus Client.
 * @param aValue
 */
public void setClientOptions(String aValue){
  String oldValue=getRunClientOptions();
  if (aValue != null) {
    projectPrivateProperties.setProperty(RUN_CLIENT_OPTIONS_KEY,aValue);
  }
 else {
    projectPrivateProperties.remove(RUN_CLIENT_OPTIONS_KEY);
  }
  projectPrivatePropertiesIsDirty=true;
  changeSupport.firePropertyChange(RUN_CLIENT_OPTIONS_KEY,oldValue,aValue);
}
Program: 145654
Project: 145654
Buggy source:
/** 
 * Sets application's server host.
 * @param aValue Url string
 */
public void setClientUrl(String aValue){
  String oldValue=getClientUrl();
  projectPrivateProperties.setProperty(CLIENT_URL_KEY,aValue);
  projectPrivatePropertiesIsDirty=true;
  changeSupport.firePropertyChange(CLIENT_URL_KEY,oldValue,aValue);
}

Fixed version (ground truth):
/** 
 * Sets application's server host.
 * @param aValue Url string
 */
public void setClientUrl(String aValue){
  String oldValue=getClientUrl();
  if (aValue != null) {
    projectPrivateProperties.setProperty(CLIENT_URL_KEY,aValue);
  }
 else {
    projectPrivateProperties.remove(CLIENT_URL_KEY);
  }
  projectPrivatePropertiesIsDirty=true;
  changeSupport.firePropertyChange(CLIENT_URL_KEY,oldValue,aValue);
}
Program: 145655
Project: 145655
Buggy source:
/** 
 * Sets if security realm to be configured on J2EE server startup.
 * @param aValue true to enable configure security realm 
 */
public void setSecurityRealmEnabled(boolean aValue){
  boolean oldValue=isWebSecurityEnabled();
  projectPrivateProperties.setProperty(ENABLE_SECURITY_REALM_KEY,Boolean.valueOf(aValue).toString());
  projectPrivatePropertiesIsDirty=true;
  changeSupport.firePropertyChange(ENABLE_SECURITY_REALM_KEY,oldValue,aValue);
}

Fixed version (ground truth):
/** 
 * Sets if security realm to be configured on J2EE server startup.
 * @param aValue true to enable configure security realm
 */
public void setSecurityRealmEnabled(boolean aValue){
  boolean oldValue=isWebSecurityEnabled();
  projectPrivateProperties.setProperty(ENABLE_SECURITY_REALM_KEY,Boolean.valueOf(aValue).toString());
  projectPrivatePropertiesIsDirty=true;
  changeSupport.firePropertyChange(ENABLE_SECURITY_REALM_KEY,oldValue,aValue);
}
Program: 145656
Project: 145656
Buggy source:
/** 
 * Sets application's context name.
 * @param aValue The name of the context string
 */
public void setServerContext(String aValue){
  String oldValue=getServerContext();
  projectProperties.setProperty(SERVER_CONTEXT_KEY,aValue);
  projectPropertiesIsDirty=true;
  changeSupport.firePropertyChange(SERVER_CONTEXT_KEY,oldValue,aValue);
}

Fixed version (ground truth):
/** 
 * Sets application's context name.
 * @param aValue The name of the context string
 */
public void setServerContext(String aValue){
  String oldValue=getServerContext();
  if (aValue != null) {
    projectProperties.setProperty(SERVER_CONTEXT_KEY,aValue);
  }
 else {
    projectProperties.remove(SERVER_CONTEXT_KEY);
  }
  projectPropertiesIsDirty=true;
  changeSupport.firePropertyChange(SERVER_CONTEXT_KEY,oldValue,aValue);
}
Program: 145657
Project: 145657
Buggy source:
/** 
 * Sets password for the Platypus user to login on application run.
 * @param aValue Platypus user name
 */
public void setRunPassword(String aValue){
  String oldValue=getRunPassword();
  projectPrivateProperties.setProperty(RUN_PASSWORD_KEY,aValue);
  projectPrivatePropertiesIsDirty=true;
  changeSupport.firePropertyChange(RUN_PASSWORD_KEY,oldValue,aValue);
}

Fixed version (ground truth):
/** 
 * Sets password for the Platypus user to login on application run.
 * @param aValue Platypus user name
 */
public void setRunPassword(String aValue){
  String oldValue=getRunPassword();
  if (aValue != null) {
    projectPrivateProperties.setProperty(RUN_PASSWORD_KEY,aValue);
  }
 else {
    projectPrivateProperties.remove(RUN_PASSWORD_KEY);
  }
  projectPrivatePropertiesIsDirty=true;
  changeSupport.firePropertyChange(RUN_PASSWORD_KEY,oldValue,aValue);
}
Program: 145658
Project: 145658
Buggy source:
/** 
 * Sets application server type to be run.
 * @param aValue AppServerType instance
 */
public void setRunAppServerType(AppServerType aValue){
  AppServerType oldValue=getRunAppServerType();
  projectPrivateProperties.setProperty(SERVER_TYPE_KEY,aValue.getId());
  projectPrivatePropertiesIsDirty=true;
  changeSupport.firePropertyChange(SERVER_TYPE_KEY,aValue,oldValue);
}

Fixed version (ground truth):
/** 
 * Sets application server type to be run.
 * @param aValue AppServerType instance
 */
public void setRunAppServerType(AppServerType aValue){
  AppServerType oldValue=getRunAppServerType();
  if (aValue != null) {
    projectPrivateProperties.setProperty(SERVER_TYPE_KEY,aValue.getId());
  }
 else {
    projectPrivateProperties.remove(SERVER_TYPE_KEY);
  }
  projectPrivatePropertiesIsDirty=true;
  changeSupport.firePropertyChange(SERVER_TYPE_KEY,aValue,oldValue);
}
Program: 145659
Project: 145659
Buggy source:
/** 
 * Sets JVM options provided to Platypus Application Server.
 * @param aValue
 */
public void setServerVmOptions(String aValue){
  String oldValue=getRunServerVmOptions();
  projectPrivateProperties.setProperty(RUN_SERVER_VM_OPTIONS_KEY,aValue);
  projectPrivatePropertiesIsDirty=true;
  changeSupport.firePropertyChange(RUN_SERVER_VM_OPTIONS_KEY,oldValue,aValue);
}

Fixed version (ground truth):
/** 
 * Sets JVM options provided to Platypus Application Server.
 * @param aValue
 */
public void setServerVmOptions(String aValue){
  String oldValue=getRunServerVmOptions();
  if (aValue != null) {
    projectPrivateProperties.setProperty(RUN_SERVER_VM_OPTIONS_KEY,aValue);
  }
 else {
    projectPrivateProperties.remove(RUN_SERVER_VM_OPTIONS_KEY);
  }
  projectPrivatePropertiesIsDirty=true;
  changeSupport.firePropertyChange(RUN_SERVER_VM_OPTIONS_KEY,oldValue,aValue);
}
Program: 145660
Project: 145660
Buggy source:
/** 
 * Sets J2EE server instance ID.
 * @param aValue J2EE server ID
 */
public void setJ2eeServerId(String aValue){
  String oldValue=getJ2eeServerId();
  projectPrivateProperties.setProperty(J2EE_SERVER_ID_KEY,aValue);
  projectPrivatePropertiesIsDirty=true;
  changeSupport.firePropertyChange(J2EE_SERVER_ID_KEY,aValue,oldValue);
}

Fixed version (ground truth):
/** 
 * Sets J2EE server instance ID.
 * @param aValue J2EE server ID
 */
public void setJ2eeServerId(String aValue){
  String oldValue=getJ2eeServerId();
  if (aValue != null) {
    projectPrivateProperties.setProperty(J2EE_SERVER_ID_KEY,aValue);
  }
 else {
    projectPrivateProperties.remove(J2EE_SERVER_ID_KEY);
  }
  projectPrivatePropertiesIsDirty=true;
  changeSupport.firePropertyChange(J2EE_SERVER_ID_KEY,aValue,oldValue);
}
Program: 145661
Project: 145661
Buggy source:
/** 
 * Sets JVM options provided to Platypus Client.
 * @param aValue
 */
public void setClientVmOptions(String aValue){
  String oldValue=getRunClientVmOptions();
  projectPrivateProperties.setProperty(RUN_CLIENT_VM_OPTIONS_KEY,aValue);
  projectPrivatePropertiesIsDirty=true;
  changeSupport.firePropertyChange(RUN_CLIENT_VM_OPTIONS_KEY,oldValue,aValue);
}

Fixed version (ground truth):
/** 
 * Sets JVM options provided to Platypus Client.
 * @param aValue
 */
public void setClientVmOptions(String aValue){
  String oldValue=getRunClientVmOptions();
  if (aValue != null) {
    projectPrivateProperties.setProperty(RUN_CLIENT_VM_OPTIONS_KEY,aValue);
  }
 else {
    projectPrivateProperties.remove(RUN_CLIENT_VM_OPTIONS_KEY);
  }
  projectPrivatePropertiesIsDirty=true;
  changeSupport.firePropertyChange(RUN_CLIENT_VM_OPTIONS_KEY,oldValue,aValue);
}
Program: 145662
Project: 145662
Buggy source:
/** 
 * Checks if security realm to be configured on J2EE server startup.
 * @return true to enable configure security realm 
 */
public boolean isWebSecurityEnabled(){
  return Boolean.valueOf(projectPrivateProperties.get(ENABLE_SECURITY_REALM_KEY));
}

Fixed version (ground truth):
/** 
 * Checks if security realm to be configured on J2EE server startup.
 * @return true to enable configure security realm
 */
public boolean isWebSecurityEnabled(){
  return Boolean.valueOf(projectPrivateProperties.get(ENABLE_SECURITY_REALM_KEY));
}