nus-yam/ex-repair huggingface dataset:
Program: 42396
Project: 42396
Buggy source:
public static ThroughputBenchmark newInstance(final String URL,final int concurrency,final int timeInMinute,final int SQLType,final boolean isElasticsearchPrimitive) throws Exception {
  if (!isElasticsearchPrimitive) {
    return new CrabsThroughputBenchmark(URL,concurrency,timeInMinute,SQLType);
  }
  final Protocol protocol=Protocol.parseURL(URL);
  final Properties properties=protocol.getProperties();
  properties.put(PROPERTY_ENTRY$BENCHMARK_ENABLED.identifier,true);
  return new ElasticsearchThroughputBenchmark(protocol.getServerAddresses(),protocol.getDatabaseName(),"String_Node_Str",properties,timeInMinute,concurrency,SQLType);
}

Fixed version (ground truth):
public static ThroughputBenchmark newInstance(final String URL,final int concurrency,final int timeInMinute,final int SQLType,final boolean isElasticsearchPrimitive) throws Exception {
  if (!isElasticsearchPrimitive) {
    return new CrabsThroughputBenchmark(URL,concurrency,timeInMinute,SQLType);
  }
  final Protocol protocol=Protocol.parseURL(URL);
  final Properties properties=protocol.getProperties();
  properties.put(PROPERTY_ENTRY$BENCHMARK_ENABLED.identifier,true);
  return new ElasticsearchThroughputBenchmark(protocol.getServerAddresses(),protocol.getDatabaseName(),"String_Node_Str",properties,timeInMinute,concurrency,SQLType,Boolean.parseBoolean(properties.getProperty(PROPERTY_ENTRY$ES_CACHE_ENABLED.identifier,PROPERTY_ENTRY$ES_CACHE_ENABLED.defaultValue)));
}
Program: 42397
Project: 42397
Buggy source:
protected ElasticsearchThroughputBenchmark(final ElasticsearchAddress[] elasticsearchAddresses,final String indexIdentifier,final String typeIdentifier,final Properties properties,final int timeInMinute,final int concurrency,final int SQLType){
  super(timeInMinute,concurrency,SQLType);
  ImmutableSettings.Builder builder=settingsBuilder();
  if (properties != null && !properties.isEmpty()) {
    for (    Map.Entry<Object,Object> entry : properties.entrySet()) {
      builder.put(entry.getKey().toString(),entry.getValue());
    }
  }
  final TransportClient client=new TransportClient(builder.build());
  for (  ElasticsearchAddress address : elasticsearchAddresses) {
    client.addTransportAddress(new InetSocketTransportAddress(address.getHost(),address.getPort()));
  }
  this.elasticsearchClient=client;
  this.indexIdentifier=indexIdentifier;
  this.typeIdentifier=typeIdentifier;
}

Fixed version (ground truth):
protected ElasticsearchThroughputBenchmark(final ElasticsearchAddress[] elasticsearchAddresses,final String indexIdentifier,final String typeIdentifier,final Properties properties,final int timeInMinute,final int concurrency,final int SQLType,final boolean elasticsearchCacheEnabled){
  super(timeInMinute,concurrency,SQLType);
  ImmutableSettings.Builder builder=settingsBuilder();
  if (properties != null && !properties.isEmpty()) {
    for (    Map.Entry<Object,Object> entry : properties.entrySet()) {
      builder.put(entry.getKey().toString(),entry.getValue());
    }
  }
  final TransportClient client=new TransportClient(builder.build());
  for (  ElasticsearchAddress address : elasticsearchAddresses) {
    client.addTransportAddress(new InetSocketTransportAddress(address.getHost(),address.getPort()));
  }
  this.elasticsearchClient=client;
  this.indexIdentifier=indexIdentifier;
  this.typeIdentifier=typeIdentifier;
  this.elasticsearchCacheEnabled=elasticsearchCacheEnabled;
}
Program: 42398
Project: 42398
Buggy source:
private static Expression analyzeLikeExpression(final GrammarAnalyzeContext context,final Expression firstExpression) throws SQLException {
  return new LikeExpression(firstExpression,analyzeExpectedExpression(context,Byte.MAX_VALUE));
}

Fixed version (ground truth):
private static Expression analyzeLikeExpression(final GrammarAnalyzeContext context,final Expression firstExpression) throws SQLException {
  return new LikeExpression(firstExpression,analyzeExpectedExpression(context,(byte)3));
}
Program: 42399
Project: 42399
Buggy source:
private static Expression analyzeInExpression(final GrammarAnalyzeContext context,final Expression firstExpression) throws SQLException {
  expectSymbol(context,'(');
  context.toNextToken();
  final ArrayList<Expression> expressionList=context.getExpressionList();
  final int startListIndex=expressionList.size();
  expressionList.add(firstExpression);
  boolean expectExpression=false;
  for (; ; ) {
    final Expression expression=expectExpression ? analyzeExpectedExpression(context,Byte.MAX_VALUE) : analyzeExpression(context,Byte.MAX_VALUE);
    if (expression != null) {
      expressionList.add(expression);
      if (context.currentTokenType() == TokenType.SYMBOL && context.currentTokenToSymbol() == ',') {
        context.toNextToken();
        expectExpression=true;
        continue;
      }
    }
    break;
  }
  expectSymbol(context,')');
  context.toNextToken();
  return new InExpression(expressionsListToArray(expressionList,startListIndex));
}

Fixed version (ground truth):
private static Expression analyzeInExpression(final GrammarAnalyzeContext context,final Expression firstExpression) throws SQLException {
  expectSymbol(context,'(');
  context.toNextToken();
  final ArrayList<Expression> expressionList=context.getExpressionList();
  final int startListIndex=expressionList.size();
  expressionList.add(firstExpression);
  boolean expectExpression=false;
  for (; ; ) {
    final Expression expression=expectExpression ? analyzeExpectedExpression(context,(byte)3) : analyzeExpression(context,(byte)3);
    if (expression != null) {
      expressionList.add(expression);
      if (context.currentTokenType() == TokenType.SYMBOL && context.currentTokenToSymbol() == ',') {
        context.toNextToken();
        expectExpression=true;
        continue;
      }
    }
    break;
  }
  expectSymbol(context,')');
  context.toNextToken();
  return new InExpression(expressionsListToArray(expressionList,startListIndex));
}
Program: 42401
Project: 42401
Buggy source:
public void beginQueue(){
  if (this.status == Stage.WORKING)   return;
  QueueEntry q;
  if ((q=this.popNextItem()) != null) {
    Logging.log("String_Node_Str" + q.getDownloadTempFile().getAbsolutePath());
    q.start();
    this.status=Stage.WORKING;
  }
}

Fixed version (ground truth):
public void beginQueue(){
  if (this.status == Stage.WORKING)   return;
  QueueEntry q;
  if ((q=this.popNextItem()) != null) {
    if (q.getDownloadTempFile() != null) {
      Logging.log("String_Node_Str" + q.getDownloadTempFile().getAbsolutePath());
    }
    q.start();
    this.status=Stage.WORKING;
  }
}
Program: 42402
Project: 42402
Buggy source:
public BufferedImage readArtwork(){
  int s;
  try {
    s=tag.getArtworkList().size();
  }
 catch (  NullPointerException e) {
    s=0;
  }
  if (s == 0) {
    return null;
  }
  Artwork a=tag.getFirstArtwork();
  byte[] data=a.getBinaryData();
  BufferedImage img;
  try {
    img=ImageIO.read(new ByteArrayInputStream(data));
    return img;
  }
 catch (  IOException e) {
    Logging.log("String_Node_Str",e);
    return null;
  }
}

Fixed version (ground truth):
public BufferedImage readArtwork(){
  int s;
  try {
    s=this.tag.getArtworkList().size();
  }
 catch (  final NullPointerException e) {
    s=0;
  }
  if (s == 0)   return null;
  final Artwork a=this.tag.getFirstArtwork();
  final byte[] data=a.getBinaryData();
  BufferedImage img;
  try {
    img=ImageIO.read(new ByteArrayInputStream(data));
    return img;
  }
 catch (  final IOException e) {
    Logging.log("String_Node_Str",e);
    return null;
  }
}
Program: 42403
Project: 42403
Buggy source:
public String readField(FieldKey f){
  try {
    String s=tag.getFirst(f);
    return s == null ? "String_Node_Str" : s;
  }
 catch (  KeyNotFoundException e) {
    return "String_Node_Str";
  }
}

Fixed version (ground truth):
public String readField(final FieldKey f){
  try {
    final String s=this.tag.getFirst(f);
    return s == null ? "String_Node_Str" : s;
  }
 catch (  final KeyNotFoundException e) {
    return "String_Node_Str";
  }
}
Program: 42404
Project: 42404
Buggy source:
public void writeAllFields(Map<FieldKey,String> fields){
  try {
    for (    Entry<FieldKey,String> e : fields.entrySet()) {
      tag.setField(e.getKey(),e.getValue().replace("String_Node_Str","String_Node_Str").trim());
    }
  }
 catch (  KeyNotFoundException|FieldDataInvalidException e) {
    Logging.log("String_Node_Str",e);
  }
}

Fixed version (ground truth):
public void writeAllFields(final Map<FieldKey,String> fields){
  try {
    for (    final Entry<FieldKey,String> e : fields.entrySet()) {
      this.tag.setField(e.getKey(),e.getValue().replace("String_Node_Str","String_Node_Str").trim());
    }
  }
 catch (  KeyNotFoundException|FieldDataInvalidException e) {
    Logging.log("String_Node_Str",e);
  }
}
Program: 42405
Project: 42405
Buggy source:
public void commit(){
  try {
    AudioFileIO.write(song);
  }
 catch (  CannotWriteException e) {
    Logging.log("String_Node_Str",e);
  }
}

Fixed version (ground truth):
public void commit(){
  try {
    AudioFileIO.write(this.song);
  }
 catch (  final CannotWriteException e) {
    Logging.log("String_Node_Str",e);
  }
}
Program: 42406
Project: 42406
Buggy source:
public void writeField(FieldKey f,String v){
  try {
    tag.setField(f,v.replace("String_Node_Str","String_Node_Str").trim());
  }
 catch (  KeyNotFoundException|FieldDataInvalidException e) {
    Logging.log("String_Node_Str" + f,e);
  }
}

Fixed version (ground truth):
public void writeField(final FieldKey f,final String v){
  try {
    this.tag.setField(f,v.replace("String_Node_Str","String_Node_Str").trim());
  }
 catch (  KeyNotFoundException|FieldDataInvalidException e) {
    Logging.log("String_Node_Str" + f,e);
  }
}
Program: 42407
Project: 42407
Buggy source:
public File getFile(){
  return musicFile;
}

Fixed version (ground truth):
public File getFile(){
  return this.musicFile;
}
Program: 42408
Project: 42408
Buggy source:
public TagEditor(File file,QueueEntry entry){
  musicFile=file;
  this.entry=entry;
  try {
    this.song=AudioFileIO.read(musicFile);
    head=song.getAudioHeader();
    tag=song.getTag();
  }
 catch (  IOException|InvalidAudioFrameException|CannotReadException|TagException|ReadOnlyFileException e) {
    Logging.log("String_Node_Str",e);
    head=null;
    tag=null;
    song=null;
  }
}

Fixed version (ground truth):
public TagEditor(final File file,final QueueEntry entry){
  this.musicFile=file;
  this.entry=entry;
  try {
    this.song=AudioFileIO.read(this.musicFile);
    this.head=this.song.getAudioHeader();
    this.tag=this.song.getTag();
  }
 catch (  IOException|InvalidAudioFrameException|CannotReadException|TagException|ReadOnlyFileException e) {
    Logging.log("String_Node_Str",e);
    this.head=null;
    this.tag=null;
    this.song=null;
  }
}
Program: 42409
Project: 42409
Buggy source:
public void writeArtwork(final BufferedImage img){
  try {
    StandardArtwork s=new StandardArtwork();
    ImageIO.write(img,"String_Node_Str",entry.getCoverTempFile());
    s.setFromFile(entry.getCoverTempFile());
    tag.deleteArtworkField();
    tag.addField(s);
  }
 catch (  FieldDataInvalidException|IOException e) {
    Logging.log("String_Node_Str",e);
  }
}

Fixed version (ground truth):
public void writeArtwork(final BufferedImage img){
  if (img == null)   return;
  try {
    final StandardArtwork s=new StandardArtwork();
    ImageIO.write(img,"String_Node_Str",this.entry.getCoverTempFile());
    s.setFromFile(this.entry.getCoverTempFile());
    this.tag.deleteArtworkField();
    this.tag.addField(s);
  }
 catch (  FieldDataInvalidException|IOException e) {
    Logging.log("String_Node_Str",e);
  }
}
Program: 42410
Project: 42410
Buggy source:
@Override public void actionPerformed(ActionEvent arg0){
  if (arg0 == null) {
    handleMetaSearch();
  }
 else {
    saveMetaData(i);
  }
}

Fixed version (ground truth):
@Override public void actionPerformed(final ActionEvent arg0){
  if (arg0 == null) {
    StepMetaSearch.this.handleMetaSearch();
  }
 else {
    StepMetaSearch.this.saveMetaData(i);
  }
}
Program: 42411
Project: 42411
Buggy source:
private void handleMetaResult(){
  if (SwingUtilities.isEventDispatchThread()) {
    final InfoFrame i=new InfoFrame(entry,d);
    i.addActionListener(new ActionListener(){
      @Override public void actionPerformed(      ActionEvent arg0){
        if (arg0 == null) {
          handleMetaSearch();
        }
 else {
          saveMetaData(i);
        }
      }
    }
);
    i.setVisible(true);
  }
 else {
    SwingUtilities.invokeLater(new Runnable(){
      @Override public void run(){
        handleMetaResult();
      }
    }
);
  }
}

Fixed version (ground truth):
private void handleMetaResult(){
  if (SwingUtilities.isEventDispatchThread()) {
    final InfoFrame i=new InfoFrame(this.entry,this.d);
    if (this.d == null) {
      i.fillInfo(this.artist,this.title,this.album);
    }
    i.addActionListener(new ActionListener(){
      @Override public void actionPerformed(      final ActionEvent arg0){
        if (arg0 == null) {
          StepMetaSearch.this.handleMetaSearch();
        }
 else {
          StepMetaSearch.this.saveMetaData(i);
        }
      }
    }
);
    i.setVisible(true);
  }
 else {
    SwingUtilities.invokeLater(new Runnable(){
      @Override public void run(){
        StepMetaSearch.this.handleMetaResult();
      }
    }
);
  }
}
Program: 42412
Project: 42412
Buggy source:
private void handleMetaSearch(){
  if (SwingUtilities.isEventDispatchThread()) {
    final SearchFrame sf=new SearchFrame(artist,title,album);
    sf.addActionListener(new ActionListener(){
      @Override public void actionPerformed(      ActionEvent arg0){
        if (arg0 == null) {
        }
 else {
          d=SearchManager.getInstance().searchForSong(sf.getArtist(),sf.getAlbum(),sf.getSongTitle());
          handleMetaResult();
        }
      }
    }
);
    sf.setVisible(true);
  }
 else {
    SwingUtilities.invokeLater(new Runnable(){
      @Override public void run(){
        handleMetaSearch();
      }
    }
);
  }
}

Fixed version (ground truth):
private void handleMetaSearch(){
  if (SwingUtilities.isEventDispatchThread()) {
    final SearchFrame sf=new SearchFrame(this.artist,this.title,this.album);
    sf.addActionListener(new ActionListener(){
      @Override public void actionPerformed(      final ActionEvent arg0){
        if (arg0 == null) {
          StepMetaSearch.this.handleMetaResult();
        }
 else {
          StepMetaSearch.this.d=SearchManager.getInstance().searchForSong(sf.getArtist(),sf.getAlbum(),sf.getSongTitle());
          StepMetaSearch.this.handleMetaResult();
        }
      }
    }
);
    sf.setVisible(true);
  }
 else {
    SwingUtilities.invokeLater(new Runnable(){
      @Override public void run(){
        StepMetaSearch.this.handleMetaSearch();
      }
    }
);
  }
}
Program: 42413
Project: 42413
Buggy source:
private void saveMetaData(InfoFrame fr){
  Map<FieldKey,String> data=new HashMap<FieldKey,String>();
  data.put(FieldKey.ARTIST,fr.getArtist());
  data.put(FieldKey.ALBUM_ARTIST,fr.getAlbumArtist());
  data.put(FieldKey.CONDUCTOR,fr.getArtist());
  data.put(FieldKey.ALBUM,fr.getAlbum());
  data.put(FieldKey.TITLE,fr.getSongtitle());
  data.put(FieldKey.TRACK,fr.getTrack());
  data.put(FieldKey.TRACK_TOTAL,fr.getTrackCount());
  data.put(FieldKey.YEAR,fr.getYear());
  data.put(FieldKey.MOOD,fr.getMood());
  data.put(FieldKey.GENRE,fr.getGenre());
  data.put(FieldKey.TEMPO,fr.getTempo());
  data.put(FieldKey.COMMENT,entry.getDownloadTempFile().getAbsolutePath());
  entry.getStepInfo().put("String_Node_Str",data);
  fr.getTagEditor().writeAllFields(data);
  fr.getTagEditor().writeArtwork(fr.getArtworkImage());
  fr.getTagEditor().commit();
  nextStep();
}

Fixed version (ground truth):
private void saveMetaData(final InfoFrame fr){
  final Map<FieldKey,String> data=new HashMap<FieldKey,String>();
  data.put(FieldKey.ARTIST,fr.getArtist());
  data.put(FieldKey.ALBUM_ARTIST,fr.getAlbumArtist());
  data.put(FieldKey.CONDUCTOR,fr.getArtist());
  data.put(FieldKey.ALBUM,fr.getAlbum());
  data.put(FieldKey.TITLE,fr.getSongtitle());
  data.put(FieldKey.TRACK,fr.getTrack());
  data.put(FieldKey.TRACK_TOTAL,fr.getTrackCount());
  data.put(FieldKey.YEAR,fr.getYear());
  data.put(FieldKey.MOOD,fr.getMood());
  data.put(FieldKey.GENRE,fr.getGenre());
  data.put(FieldKey.TEMPO,fr.getTempo());
  data.put(FieldKey.COMMENT,this.entry.getDownloadTempFile().getAbsolutePath());
  this.entry.getStepInfo().put("String_Node_Str",data);
  fr.getTagEditor().writeAllFields(data);
  fr.getTagEditor().writeArtwork(fr.getArtworkImage());
  fr.getTagEditor().commit();
  this.nextStep();
}
Program: 42414
Project: 42414
Buggy source:
@Override public String getStepResults(){
  return d == null ? "String_Node_Str" : "String_Node_Str" + d.getTitle() + "String_Node_Str";
}

Fixed version (ground truth):
@Override public String getStepResults(){
  return this.d == null ? "String_Node_Str" : "String_Node_Str" + this.d.getTitle() + "String_Node_Str";
}
Program: 42415
Project: 42415
Buggy source:
@Override public void run(){
  handleMetaResult();
}

Fixed version (ground truth):
@Override public void run(){
  StepMetaSearch.this.handleMetaResult();
}
Program: 42416
Project: 42416
Buggy source:
public StepMetaSearch(QueueEntry entry){
  super(entry,new StepDescriptor("String_Node_Str","String_Node_Str"));
}

Fixed version (ground truth):
public StepMetaSearch(final QueueEntry entry){
  super(entry,new StepDescriptor("String_Node_Str","String_Node_Str"));
}
Program: 42417
Project: 42417
Buggy source:
@Override public void doStep(){
  String baseName=FilenameUtils.getBaseName(entry.getDownloadTempFile().getAbsolutePath());
  String[] parts=baseName.split("String_Node_Str");
switch (parts.length) {
case 1:
    title=parts[0].trim();
  break;
case 2:
artist=parts[0].trim();
title=parts[1].trim();
break;
case 3:
artist=parts[0].trim();
title=parts[1].trim();
album=parts[2].trim();
break;
default :
int n=parts.length - 3;
artist=parts[n].trim();
title=parts[n + 1].trim();
album=parts[n + 2].trim();
}
handleMetaSearch();
}

Fixed version (ground truth):
@Override public void doStep(){
  final String baseName=FilenameUtils.getBaseName(this.entry.getDownloadTempFile().getAbsolutePath());
  final String[] parts=baseName.split("String_Node_Str");
switch (parts.length) {
case 1:
    this.title=parts[0].trim();
  break;
case 2:
this.artist=parts[0].trim();
this.title=parts[1].trim();
break;
case 3:
this.artist=parts[0].trim();
this.title=parts[1].trim();
this.album=parts[2].trim();
break;
default :
final int n=parts.length - 3;
this.artist=parts[n].trim();
this.title=parts[n + 1].trim();
this.album=parts[n + 2].trim();
}
this.handleMetaSearch();
}
Program: 42418
Project: 42418
Buggy source:
public void addDownloadTempFile(final File file){
  downloadTempFile=file;
  final QueueEntry q=new QueueEntry(file);
  Queue.getInstance().addEntry(q);
}

Fixed version (ground truth):
public void addDownloadTempFile(final File file){
  downloadTempFile=file;
  final QueueEntry q=new QueueEntry(file);
  Logging.log("String_Node_Str" + file.getAbsolutePath());
  Queue.getInstance().addEntry(q);
}
Program: 42419
Project: 42419
Buggy source:
private boolean processInLine() throws IOException {
  String line;
  if ((line=in.readLine()) != null) {
    for (    final ProcessListener l : listener) {
      l.processLineOut(line);
    }
    return true;
  }
  return false;
}

Fixed version (ground truth):
private boolean processInLine() throws IOException {
  String line;
  if ((line=in.readLine()) != null) {
    Logging.log("String_Node_Str" + line);
    for (    final ProcessListener l : listener) {
      l.processLineOut(line);
    }
    return true;
  }
  return false;
}
Program: 42420
Project: 42420
Buggy source:
@Override public void processLineOut(final String line){
  if (DownloadInfo.isProgress(line)) {
    final DownloadInfo dinf=new DownloadInfo(line);
    final double c=dinf.progress / 100.0;
    double base=(double)(current - 1) / (double)total;
    base+=c / total;
    StepDownload.this.reportProgress(base);
  }
  if (line.contains("String_Node_Str")) {
    final String[] p=line.split("String_Node_Str")[1].split("String_Node_Str");
    current=Integer.parseInt(p[0]);
    total=Integer.parseInt(p[1]);
  }
  if (line.contains("String_Node_Str") && line.contains("String_Node_Str")) {
    final String p=line.split("String_Node_Str")[1].trim();
    StepDownload.this.entry.addDownloadTempFile(new File(p));
  }
  if (line.contains("String_Node_Str") && line.contains("String_Node_Str")) {
    String p=line.split("String_Node_Str")[1].substring(2);
    p=p.split("String_Node_Str")[0].trim();
    StepDownload.this.entry.addDownloadTempFile(new File(p));
  }
}

Fixed version (ground truth):
@Override public void processLineOut(final String line){
  if (DownloadInfo.isProgress(line)) {
    final DownloadInfo dinf=new DownloadInfo(line);
    final double c=dinf.progress / 100.0;
    double base=(double)(current - 1) / (double)total;
    base+=c / total;
    StepDownload.this.reportProgress(base);
  }
  if (line.contains("String_Node_Str")) {
    final String[] p=line.split("String_Node_Str")[1].split("String_Node_Str");
    current=Integer.parseInt(p[0]);
    total=Integer.parseInt(p[1]);
  }
  if (line.contains("String_Node_Str") && line.contains("String_Node_Str")) {
    String p=line.split("String_Node_Str")[1].trim();
    p=p.replaceAll("String_Node_Str","String_Node_Str");
    StepDownload.this.entry.addDownloadTempFile(new File(p));
  }
  if (line.contains("String_Node_Str") && line.contains("String_Node_Str")) {
    String p=line.split("String_Node_Str")[1].substring(2);
    p=p.split("String_Node_Str")[0].trim();
    StepDownload.this.entry.addDownloadTempFile(new File(p));
  }
}
Program: 42421
Project: 42421
Buggy source:
@Override public void doStep(){
  final ProcessBuilder n=new ProcessBuilder(ConfigManager.YOUTUBE_DL.getAbsolutePath(),"String_Node_Str",ConfigManager.TEMP_DIR.getAbsolutePath() + ConfigManager.DS + "String_Node_Str",entry.getWebURL());
  final CLI y=new CLI(n);
  y.addProcessListener(new ProcessAdapter(){
    private int current=1;
    private int total=1;
    @Override public void processLineOut(    final String line){
      if (DownloadInfo.isProgress(line)) {
        final DownloadInfo dinf=new DownloadInfo(line);
        final double c=dinf.progress / 100.0;
        double base=(double)(current - 1) / (double)total;
        base+=c / total;
        StepDownload.this.reportProgress(base);
      }
      if (line.contains("String_Node_Str")) {
        final String[] p=line.split("String_Node_Str")[1].split("String_Node_Str");
        current=Integer.parseInt(p[0]);
        total=Integer.parseInt(p[1]);
      }
      if (line.contains("String_Node_Str") && line.contains("String_Node_Str")) {
        final String p=line.split("String_Node_Str")[1].trim();
        StepDownload.this.entry.addDownloadTempFile(new File(p));
      }
      if (line.contains("String_Node_Str") && line.contains("String_Node_Str")) {
        String p=line.split("String_Node_Str")[1].substring(2);
        p=p.split("String_Node_Str")[0].trim();
        StepDownload.this.entry.addDownloadTempFile(new File(p));
      }
    }
  }
);
  y.run();
  nextStep();
}

Fixed version (ground truth):
@Override public void doStep(){
  final ProcessBuilder n=new ProcessBuilder(ConfigManager.YOUTUBE_DL.getAbsolutePath(),"String_Node_Str",ConfigManager.TEMP_DIR.getAbsolutePath() + ConfigManager.DS + "String_Node_Str",entry.getWebURL());
  final CLI y=new CLI(n);
  y.addProcessListener(new ProcessAdapter(){
    private int current=1;
    private int total=1;
    @Override public void processLineOut(    final String line){
      if (DownloadInfo.isProgress(line)) {
        final DownloadInfo dinf=new DownloadInfo(line);
        final double c=dinf.progress / 100.0;
        double base=(double)(current - 1) / (double)total;
        base+=c / total;
        StepDownload.this.reportProgress(base);
      }
      if (line.contains("String_Node_Str")) {
        final String[] p=line.split("String_Node_Str")[1].split("String_Node_Str");
        current=Integer.parseInt(p[0]);
        total=Integer.parseInt(p[1]);
      }
      if (line.contains("String_Node_Str") && line.contains("String_Node_Str")) {
        String p=line.split("String_Node_Str")[1].trim();
        p=p.replaceAll("String_Node_Str","String_Node_Str");
        StepDownload.this.entry.addDownloadTempFile(new File(p));
      }
      if (line.contains("String_Node_Str") && line.contains("String_Node_Str")) {
        String p=line.split("String_Node_Str")[1].substring(2);
        p=p.split("String_Node_Str")[0].trim();
        StepDownload.this.entry.addDownloadTempFile(new File(p));
      }
    }
  }
);
  y.run();
  nextStep();
}
Program: 42422
Project: 42422
Buggy source:
public static String sanitize(String main){
  return main.replace("String_Node_Str","String_Node_Str").replace("String_Node_Str","String_Node_Str").replace("String_Node_Str","String_Node_Str").replace("String_Node_Str","String_Node_Str").replace("String_Node_Str","String_Node_Str").replace("String_Node_Str","String_Node_Str").replace("String_Node_Str","String_Node_Str").replace("String_Node_Str","String_Node_Str").replace("String_Node_Str","String_Node_Str");
}

Fixed version (ground truth):
public static String sanitize(String main){
  return main.replace("String_Node_Str","String_Node_Str").replace("String_Node_Str","String_Node_Str").replace("String_Node_Str","String_Node_Str").replace("String_Node_Str","String_Node_Str").replace("String_Node_Str","String_Node_Str").replace("String_Node_Str","String_Node_Str").replace("String_Node_Str","String_Node_Str").replace("String_Node_Str","String_Node_Str").replace("String_Node_Str","String_Node_Str").replace("String_Node_Str","String_Node_Str").replace("String_Node_Str","String_Node_Str");
}
Program: 42423
Project: 42423
Buggy source:
public void writeAllFields(Map<FieldKey,String> fields){
  try {
    for (    Entry<FieldKey,String> e : fields.entrySet()) {
      tag.setField(e.getKey(),e.getValue());
    }
  }
 catch (  KeyNotFoundException|FieldDataInvalidException e) {
    Logging.log("String_Node_Str",e);
  }
}

Fixed version (ground truth):
public void writeAllFields(Map<FieldKey,String> fields){
  try {
    for (    Entry<FieldKey,String> e : fields.entrySet()) {
      tag.setField(e.getKey(),e.getValue().replace("String_Node_Str","String_Node_Str").trim());
    }
  }
 catch (  KeyNotFoundException|FieldDataInvalidException e) {
    Logging.log("String_Node_Str",e);
  }
}
Program: 42424
Project: 42424
Buggy source:
public void writeField(FieldKey f,String v){
  try {
    tag.setField(f,v);
  }
 catch (  KeyNotFoundException|FieldDataInvalidException e) {
    Logging.log("String_Node_Str" + f,e);
  }
}

Fixed version (ground truth):
public void writeField(FieldKey f,String v){
  try {
    tag.setField(f,v.replace("String_Node_Str","String_Node_Str").trim());
  }
 catch (  KeyNotFoundException|FieldDataInvalidException e) {
    Logging.log("String_Node_Str" + f,e);
  }
}
Program: 42425
Project: 42425
Buggy source:
@SuppressWarnings("String_Node_Str") @Override public void doStep(){
  data=(Map<FieldKey,String>)(entry.getStepInfo().get("String_Node_Str"));
  String convention=ConfigManager.getInstance().getConfig(ConfigKey.FILENAME_CONVENTION,"String_Node_Str");
  convention=r(convention,"String_Node_Str",FieldKey.ALBUM);
  convention=r(convention,"String_Node_Str",FieldKey.TITLE);
  convention=r(convention,"String_Node_Str",FieldKey.ARTIST);
  convention=r(convention,"String_Node_Str",FieldKey.TRACK);
  convention=r(convention,"String_Node_Str",FieldKey.TRACK_TOTAL);
  convention=r(convention,"String_Node_Str",FieldKey.YEAR);
  String dirPath=ConfigManager.getInstance().getConfig(ConfigKey.DIR_TARGET,ConfigManager.TEMP_DIR.getAbsolutePath());
  finalFile=new File(dirPath + ConfigManager.DS + convention+ "String_Node_Str");
  try {
    if (finalFile.exists()) {
      int answer=JOptionPane.showConfirmDialog(null,"String_Node_Str" + finalFile.getAbsolutePath() + "String_Node_Str","String_Node_Str",JOptionPane.YES_NO_OPTION,JOptionPane.WARNING_MESSAGE);
      if (answer == JOptionPane.OK_OPTION) {
        FileUtils.deleteQuietly(finalFile);
        FileUtils.moveFile(entry.getConvertTempFile(),finalFile);
      }
    }
 else {
      FileUtils.moveFile(entry.getConvertTempFile(),finalFile);
    }
  }
 catch (  IOException e) {
    Logging.log("String_Node_Str",e);
  }
  nextStep();
}

Fixed version (ground truth):
@SuppressWarnings("String_Node_Str") @Override public void doStep(){
  data=(Map<FieldKey,String>)(entry.getStepInfo().get("String_Node_Str"));
  String convention=ConfigManager.getInstance().getConfig(ConfigKey.FILENAME_CONVENTION,"String_Node_Str").replace("String_Node_Str","String_Node_Str").replace("String_Node_Str","String_Node_Str");
  convention=r(convention,"String_Node_Str",FieldKey.ALBUM);
  convention=r(convention,"String_Node_Str",FieldKey.TITLE);
  convention=r(convention,"String_Node_Str",FieldKey.ARTIST);
  convention=r(convention,"String_Node_Str",FieldKey.TRACK);
  convention=r(convention,"String_Node_Str",FieldKey.TRACK_TOTAL);
  convention=r(convention,"String_Node_Str",FieldKey.YEAR);
  String dirPath=ConfigManager.getInstance().getConfig(ConfigKey.DIR_TARGET,ConfigManager.TEMP_DIR.getAbsolutePath()).replace("String_Node_Str","String_Node_Str").replace("String_Node_Str","String_Node_Str");
  finalFile=new File(dirPath + ConfigManager.DS + convention+ "String_Node_Str");
  try {
    if (finalFile.exists()) {
      int answer=JOptionPane.showConfirmDialog(null,"String_Node_Str" + finalFile.getAbsolutePath() + "String_Node_Str","String_Node_Str",JOptionPane.YES_NO_OPTION,JOptionPane.WARNING_MESSAGE);
      if (answer == JOptionPane.OK_OPTION) {
        FileUtils.deleteQuietly(finalFile);
        FileUtils.moveFile(entry.getConvertTempFile(),finalFile);
      }
    }
 else {
      FileUtils.moveFile(entry.getConvertTempFile(),finalFile);
    }
  }
 catch (  IOException e) {
    Logging.log("String_Node_Str",e);
  }
  nextStep();
}
Program: 42426
Project: 42426
Buggy source:
@Override public void updateStatus(Integer status){
  this.getCache().put(CACHE_NAME_PREFIX,status);
  logger.trace("String_Node_Str",status);
}

Fixed version (ground truth):
@Override public void updateStatus(Integer status){
  this.getCache().put(CACHE_NAME_STATUS,status);
  logger.trace("String_Node_Str",status);
}
Program: 42427
Project: 42427
Buggy source:
@Override public Integer getStatus(){
  return this.getCache().get(CACHE_NAME_PREFIX,Integer.class);
}

Fixed version (ground truth):
@Override public Integer getStatus(){
  return this.get(CACHE_NAME_STATUS,Integer.class);
}
Program: 42428
Project: 42428
Buggy source:
public Collection<Content> getPublishedContents(String pageCode){
  Set<Content> contents=new HashSet<Content>();
  try {
    IPage page=this.getOnlinePage(pageCode);
    if (null == page) {
      return contents;
    }
    this.addPublishedContents(page.getWidgets(),contents);
  }
 catch (  Throwable t) {
    String msg="String_Node_Str" + pageCode + "String_Node_Str";
    _logger.error("String_Node_Str",pageCode,t);
    throw new RuntimeException(msg,t);
  }
  return contents;
}

Fixed version (ground truth):
public Collection<Content> getPublishedContents(String pageCode){
  return this.getOnlinePublishedContents(pageCode);
}
Program: 42429
Project: 42429
Buggy source:
public void setViewerWidgetCode(String viewerWidgetCode){
  this._viewerWidgetCode=viewerWidgetCode;
}

Fixed version (ground truth):
public void setViewerWidgetCode(String viewerWidgetCode){
  this.viewerWidgetCode=viewerWidgetCode;
}
Program: 42430
Project: 42430
Buggy source:
protected IContentManager getContentManager(){
  return _contentManager;
}

Fixed version (ground truth):
protected IContentManager getContentManager(){
  return contentManager;
}
Program: 42431
Project: 42431
Buggy source:
public List<ContentRecordVO> getReferencingContents(String pageCode){
  List<ContentRecordVO> referencingContents=null;
  try {
    List<String> referencingContentsId=this.getReferencingContentsId(pageCode);
    if (null != referencingContentsId) {
      referencingContents=new ArrayList<ContentRecordVO>();
      for (int i=0; i < referencingContentsId.size(); i++) {
        ContentRecordVO contentVo=this.getContentManager().loadContentVO(referencingContentsId.get(i));
        if (null != contentVo) {
          referencingContents.add(contentVo);
        }
      }
    }
  }
 catch (  Throwable t) {
    _logger.error("String_Node_Str",pageCode,t);
    String msg="String_Node_Str" + pageCode + "String_Node_Str";
    throw new RuntimeException(msg,t);
  }
  return referencingContents;
}

Fixed version (ground truth):
public List<ContentRecordVO> getReferencingContents(String pageCode){
  List<ContentRecordVO> referencingContents=null;
  try {
    List<String> referencingContentsId=this.getReferencingContentsId(pageCode);
    if (null != referencingContentsId) {
      referencingContents=new ArrayList<>();
      for (int i=0; i < referencingContentsId.size(); i++) {
        ContentRecordVO contentVo=this.getContentManager().loadContentVO(referencingContentsId.get(i));
        if (null != contentVo) {
          referencingContents.add(contentVo);
        }
      }
    }
  }
 catch (  Throwable t) {
    logger.error("String_Node_Str",pageCode,t);
    String msg="String_Node_Str" + pageCode + "String_Node_Str";
    throw new RuntimeException(msg,t);
  }
  return referencingContents;
}
Program: 42432
Project: 42432
Buggy source:
public void setViewerPage(boolean viewerPage){
  this._viewerPage=viewerPage;
}

Fixed version (ground truth):
public void setViewerPage(boolean viewerPage){
  this.viewerPage=viewerPage;
}
Program: 42433
Project: 42433
Buggy source:
public void setContentManager(IContentManager contentManager){
  this._contentManager=contentManager;
}

Fixed version (ground truth):
public void setContentManager(IContentManager contentManager){
  this.contentManager=contentManager;
}
Program: 42434
Project: 42434
Buggy source:
public boolean isViewerPage(){
  return _viewerPage;
}

Fixed version (ground truth):
public boolean isViewerPage(){
  return viewerPage;
}
Program: 42435
Project: 42435
Buggy source:
public List<String> getReferencingContentsId(String pageCode){
  List<String> referencingContentsId=null;
  try {
    referencingContentsId=((PageUtilizer)this.getContentManager()).getPageUtilizers(pageCode);
  }
 catch (  Throwable t) {
    _logger.error("String_Node_Str",pageCode,t);
    String msg="String_Node_Str" + pageCode + "String_Node_Str";
    throw new RuntimeException(msg,t);
  }
  return referencingContentsId;
}

Fixed version (ground truth):
public List<String> getReferencingContentsId(String pageCode){
  List<String> referencingContentsId=null;
  try {
    referencingContentsId=((PageUtilizer)this.getContentManager()).getPageUtilizers(pageCode);
  }
 catch (  Throwable t) {
    logger.error("String_Node_Str",pageCode,t);
    String msg="String_Node_Str" + pageCode + "String_Node_Str";
    throw new RuntimeException(msg,t);
  }
  return referencingContentsId;
}
Program: 42436
Project: 42436
Buggy source:
public String setViewerPageAPI(){
  IPage page=null;
  try {
    page=this.getPage(this.getPageCode());
    int mainFrame=page.getMetadata().getModel().getMainFrame();
    if (mainFrame > -1) {
      IWidgetTypeManager showletTypeManager=(IWidgetTypeManager)ApsWebApplicationUtils.getBean(SystemConstants.WIDGET_TYPE_MANAGER,this.getRequest());
      Widget viewer=new Widget();
      viewer.setConfig(new ApsProperties());
      WidgetType type=showletTypeManager.getWidgetType(this.getViewerWidgetCode());
      if (null == type) {
        _logger.warn("String_Node_Str",page.getCode());
        return SUCCESS;
      }
      viewer.setType(type);
      Widget[] widgets=page.getWidgets();
      widgets[mainFrame]=viewer;
    }
    this.getPageManager().updatePage(page);
  }
 catch (  Throwable t) {
    _logger.error("String_Node_Str",page.getCode(),t);
    return FAILURE;
  }
  return SUCCESS;
}

Fixed version (ground truth):
public String setViewerPageAPI(){
  IPage page=null;
  try {
    page=this.getPage(this.getPageCode());
    int mainFrame=page.getMetadata().getModel().getMainFrame();
    if (mainFrame > -1) {
      IWidgetTypeManager widgetTypeManager=(IWidgetTypeManager)ApsWebApplicationUtils.getBean(SystemConstants.WIDGET_TYPE_MANAGER,this.getRequest());
      Widget viewer=new Widget();
      viewer.setConfig(new ApsProperties());
      WidgetType type=widgetTypeManager.getWidgetType(this.getViewerWidgetCode());
      if (null == type) {
        logger.warn("String_Node_Str",page.getCode());
        return SUCCESS;
      }
      viewer.setType(type);
      Widget[] widgets=page.getWidgets();
      widgets[mainFrame]=viewer;
    }
    this.getPageManager().updatePage(page);
  }
 catch (  Throwable t) {
    logger.error("String_Node_Str",page.getCode(),t);
    return FAILURE;
  }
  return SUCCESS;
}
Program: 42437
Project: 42437
Buggy source:
public Collection<Content> getOnlinePublishedContents(String pageCode){
  Collection<Content> contents=new HashSet<Content>();
  try {
    IPage page=this.getOnlinePage(pageCode);
    if (page != null) {
      this.addPublishedContents(page.getWidgets(),contents);
    }
  }
 catch (  Throwable t) {
    String msg="String_Node_Str" + pageCode + "String_Node_Str";
    _logger.error("String_Node_Str",pageCode,t);
    throw new RuntimeException(msg,t);
  }
  return contents;
}

Fixed version (ground truth):
public Collection<Content> getOnlinePublishedContents(String pageCode){
  return CmsPageUtil.getPublishedContents(pageCode,false,ApsWebApplicationUtils.getWebApplicationContext(this.getRequest()));
}
Program: 42438
Project: 42438
Buggy source:
protected String getViewerWidgetCode(){
  return _viewerWidgetCode;
}

Fixed version (ground truth):
protected String getViewerWidgetCode(){
  return viewerWidgetCode;
}
Program: 42440
Project: 42440
Buggy source:
@Override public InputStream getInputStream() throws Throwable {
  return new FileInputStream(this._file);
}

Fixed version (ground truth):
@Override public InputStream getInputStream() throws Throwable {
  if (null == _file) {
    return null;
  }
  return new FileInputStream(this._file);
}
Program: 42441
Project: 42441
Buggy source:
@Override public int getFileSize(){
  return (int)this.getFile().length() / 1000;
}

Fixed version (ground truth):
@Override public int getFileSize(){
  if (null == _file) {
    return 0;
  }
  return (int)this.getFile().length() / 1000;
}
Program: 42442
Project: 42442
Buggy source:
@Override public String getFileName(){
  if (null != this._fileName) {
    return _fileName;
  }
  String fullName=this.getFile().getName();
  return fullName.substring(fullName.lastIndexOf('/') + 1).trim();
}

Fixed version (ground truth):
@Override public String getFileName(){
  if (null != this._fileName) {
    return _fileName;
  }
  if (null == _file) {
    return null;
  }
  String fullName=this.getFile().getName();
  return fullName.substring(fullName.lastIndexOf('/') + 1).trim();
}
Program: 42443
Project: 42443
Buggy source:
protected static String buildCacheKey(IContentListBean bean,Collection<String> userGroupCodes){
  StringBuilder cacheKey=new StringBuilder();
  if (null != bean.getListName()) {
    cacheKey.append("String_Node_Str").append(bean.getListName());
  }
  if (null != bean.getContentType()) {
    cacheKey.append("String_Node_Str").append(bean.getContentType());
  }
  List<String> groupCodes=new ArrayList<String>(userGroupCodes);
  if (!groupCodes.contains(Group.FREE_GROUP_NAME)) {
    groupCodes.add(Group.FREE_GROUP_NAME);
  }
  Collections.sort(groupCodes);
  for (int i=0; i < groupCodes.size(); i++) {
    if (i == 0) {
      cacheKey.append("String_Node_Str");
    }
    String code=groupCodes.get(i);
    cacheKey.append("String_Node_Str").append(code);
  }
  if (null != bean.getCategories()) {
    List<String> categoryCodes=Arrays.asList(bean.getCategories());
    Collections.sort(categoryCodes);
    for (int j=0; j < categoryCodes.size(); j++) {
      if (j == 0) {
        cacheKey.append("String_Node_Str");
      }
      String code=categoryCodes.get(j);
      cacheKey.append("String_Node_Str").append(code);
    }
  }
  if (null != bean.getFilters()) {
    for (int k=0; k < bean.getFilters().length; k++) {
      if (k == 0) {
        cacheKey.append("String_Node_Str");
      }
      EntitySearchFilter filter=bean.getFilters()[k];
      cacheKey.append("String_Node_Str").append(filter.toString());
    }
  }
  return cacheKey.toString();
}

Fixed version (ground truth):
protected static String buildCacheKey(IContentListBean bean,Collection<String> userGroupCodes){
  return buildStringBuilderCacheKey(bean,userGroupCodes).toString();
}
Program: 42444
Project: 42444
Buggy source:
protected List<String> executeFullTextSearch(IContentListTagBean bean,List<String> masterContentsId,RequestContext reqCtx) throws ApsSystemException {
  UserFilterOptionBean fullTextUserFilter=null;
  List<UserFilterOptionBean> userFilterOptions=bean.getUserFilterOptions();
  if (null != userFilterOptions) {
    for (    UserFilterOptionBean userFilter : userFilterOptions) {
      if (null != userFilter.getFormFieldValues() && userFilter.getFormFieldValues().size() > 0) {
        if (!userFilter.isAttributeFilter() && userFilter.getKey().equals(UserFilterOptionBean.KEY_FULLTEXT)) {
          fullTextUserFilter=userFilter;
        }
      }
    }
  }
  if (fullTextUserFilter != null && null != fullTextUserFilter.getFormFieldValues()) {
    String word=fullTextUserFilter.getFormFieldValues().get(fullTextUserFilter.getFormFieldNames()[0]);
    Lang currentLang=(Lang)reqCtx.getExtraParam(SystemConstants.EXTRAPAR_CURRENT_LANG);
    List<String> fullTextResult=this.getSearchEngineManager().searchEntityId(currentLang.getCode(),word,this.getAllowedGroups(reqCtx));
    if (null != fullTextResult) {
      return ListUtils.intersection(fullTextResult,masterContentsId);
    }
 else {
      return new ArrayList<String>();
    }
  }
 else {
    return masterContentsId;
  }
}

Fixed version (ground truth):
protected List<String> executeFullTextSearch(IContentListTagBean bean,List<String> masterContentsId,RequestContext reqCtx) throws ApsSystemException {
  UserFilterOptionBean fullTextUserFilter=null;
  List<UserFilterOptionBean> userFilterOptions=bean.getUserFilterOptions();
  if (null != userFilterOptions) {
    for (    UserFilterOptionBean userFilter : userFilterOptions) {
      if (null != userFilter.getFormFieldValues() && userFilter.getFormFieldValues().size() > 0) {
        if (!userFilter.isAttributeFilter() && userFilter.getKey().equals(UserFilterOptionBean.KEY_FULLTEXT)) {
          fullTextUserFilter=userFilter;
        }
      }
    }
  }
  if (fullTextUserFilter != null && null != fullTextUserFilter.getFormFieldValues()) {
    String word=fullTextUserFilter.getFormFieldValues().get(fullTextUserFilter.getFormFieldNames()[0]);
    Lang currentLang=(Lang)reqCtx.getExtraParam(SystemConstants.EXTRAPAR_CURRENT_LANG);
    List<String> fullTextResult=this.getSearchEngineManager().searchEntityId(currentLang.getCode(),word,this.getAllowedGroups(reqCtx));
    if (null != fullTextResult) {
      return ListUtils.intersection(fullTextResult,masterContentsId);
    }
 else {
      return new ArrayList<>();
    }
  }
 else {
    return masterContentsId;
  }
}
Program: 42446
Project: 42446
Buggy source:
protected String[] getCategories(String[] categories,ApsProperties config,List<UserFilterOptionBean> userFilters){
  Set<String> codes=new HashSet<String>();
  if (null != categories) {
    for (    String category : categories) {
      codes.add(category);
    }
  }
  String categoriesParam=(null != config) ? config.getProperty(WIDGET_PARAM_CATEGORIES) : null;
  if (null != categoriesParam && categoriesParam.trim().length() > 0) {
    List<String> categoryCodes=splitValues(categoriesParam,CATEGORIES_SEPARATOR);
    for (    String categoryCode : categoryCodes) {
      codes.add(categoryCode);
    }
  }
  if (null != userFilters) {
    for (    UserFilterOptionBean userFilterBean : userFilters) {
      if (!userFilterBean.isAttributeFilter() && userFilterBean.getKey().equals(UserFilterOptionBean.KEY_CATEGORY) && null != userFilterBean.getFormFieldValues()) {
        codes.add(userFilterBean.getFormFieldValues().get(userFilterBean.getFormFieldNames()[0]));
      }
    }
  }
  if (codes.isEmpty()) {
    return null;
  }
  String[] categoryCodes=new String[codes.size()];
  Iterator<String> iter=codes.iterator();
  int i=0;
  while (iter.hasNext()) {
    categoryCodes[i++]=iter.next();
  }
  return categoryCodes;
}

Fixed version (ground truth):
protected String[] getCategories(String[] categories,ApsProperties config,List<UserFilterOptionBean> userFilters){
  Set<String> codes=new HashSet<>();
  if (null != categories) {
    for (    String category : categories) {
      codes.add(category);
    }
  }
  String categoriesParam=(null != config) ? config.getProperty(WIDGET_PARAM_CATEGORIES) : null;
  if (null != categoriesParam && categoriesParam.trim().length() > 0) {
    List<String> categoryCodes=splitValues(categoriesParam,CATEGORIES_SEPARATOR);
    for (    String categoryCode : categoryCodes) {
      codes.add(categoryCode);
    }
  }
  if (null != userFilters) {
    for (    UserFilterOptionBean userFilterBean : userFilters) {
      if (!userFilterBean.isAttributeFilter() && userFilterBean.getKey().equals(UserFilterOptionBean.KEY_CATEGORY) && null != userFilterBean.getFormFieldValues()) {
        codes.add(userFilterBean.getFormFieldValues().get(userFilterBean.getFormFieldNames()[0]));
      }
    }
  }
  if (codes.isEmpty()) {
    return null;
  }
  String[] categoryCodes=new String[codes.size()];
  Iterator<String> iter=codes.iterator();
  int i=0;
  while (iter.hasNext()) {
    categoryCodes[i++]=iter.next();
  }
  return categoryCodes;
}
Program: 42450
Project: 42450
Buggy source:
public void postTaskForm(final KieApiInputFormTask form) throws Throwable {
  if (null == form) {
    throw new ApiException(IApiErrorCodes.API_VALIDATION_ERROR,"String_Node_Str",Response.Status.CONFLICT);
  }
  String containerId=null;
  String taskId=null;
  Map<String,String> input=new HashMap<>();
  for (  KieApiInputFormTask.Field field : form.getFields()) {
    if (field.getName().equalsIgnoreCase("String_Node_Str")) {
      containerId=field.getValue();
    }
    if (field.getName().equalsIgnoreCase("String_Node_Str")) {
      taskId=field.getValue();
    }
    input.put(field.getName().replace(KieApiField.FIELD_NAME_PREFIX,"String_Node_Str"),field.getValue());
  }
  final String result=this.getKieFormManager().completeHumanFormTask(containerId,"String_Node_Str",Long.valueOf(taskId),input);
  logger.info("String_Node_Str",result);
}

Fixed version (ground truth):
public void postTaskForm(final KieApiInputFormTask form) throws Throwable {
  if (null == form) {
    throw new ApiException(IApiErrorCodes.API_VALIDATION_ERROR,"String_Node_Str",Response.Status.CONFLICT);
  }
  String containerId=null;
  String taskId=null;
  String processId=null;
  Map<String,String> input=new HashMap<>();
  for (  KieApiInputFormTask.Field field : form.getFields()) {
    logger.info("String_Node_Str",field.getName(),field.getValue());
    if (field.getName().equalsIgnoreCase("String_Node_Str")) {
      containerId=field.getValue();
    }
    if (field.getName().equalsIgnoreCase("String_Node_Str")) {
      taskId=field.getValue();
    }
    if (field.getName().equalsIgnoreCase("String_Node_Str")) {
      processId=field.getValue();
    }
    input.put(field.getName().replace(KieApiField.FIELD_NAME_PREFIX,"String_Node_Str"),field.getValue());
  }
  final String result=this.getKieFormManager().completeHumanFormTask(containerId,processId,Long.valueOf(taskId),input);
  logger.info("String_Node_Str",result);
}