nus-yam/ex-repair huggingface dataset:
Program: 153295
Project: 153295
Buggy source:
public static LocatedFeature fromFeature(Feature feature){
  LocatedFeature lFeature=new LocatedFeature();
  for (  Field field : Feature.class.getFields()) {
    try {
      Object o=field.get(feature);
      if (o != null) {
        field.set(lFeature,o);
      }
    }
 catch (    Exception e) {
      throw new RuntimeException(e);
    }
  }
  Coordinates c=feature.coordinates.get(0);
  lFeature.fmax=c.fmax;
  lFeature.fmin=c.fmin;
  lFeature.region=c.region;
  lFeature.phase=c.phase;
  lFeature.strand=c.strand;
  return lFeature;
}

Fixed version (ground truth):
public static LocatedFeature fromFeature(Feature feature){
  LocatedFeature lFeature=new LocatedFeature();
  for (  Field field : Feature.class.getFields()) {
    try {
      Object o=field.get(feature);
      if (o != null) {
        field.set(lFeature,o);
      }
    }
 catch (    Exception e) {
      throw new RuntimeException(e);
    }
  }
  boolean found=false;
  if (feature.coordinates != null) {
    for (    Coordinates c : feature.coordinates) {
      if (c.toplevel) {
        lFeature.fmax=c.fmax;
        lFeature.fmin=c.fmin;
        lFeature.region=c.region;
        lFeature.phase=c.phase;
        lFeature.strand=c.strand;
        found=true;
        break;
      }
    }
  }
  if (!found) {
    logger.warn("String_Node_Str" + feature.uniqueName + "String_Node_Str");
  }
  return lFeature;
}
Program: 153297
Project: 153297
Buggy source:
public String getActualSequenceName(int fileID,String sequenceName) throws Exception {
  Alignment alignment=alignmentStore.getAlignment(fileID);
  SAMFileReader file=alignment.getReader();
  List<AlignmentSequenceAlias> sequences=alignmentStore.getSequences();
  for (  SAMSequenceRecord ssr : file.getFileHeader().getSequenceDictionary().getSequences()) {
    String currentName=ssr.getSequenceName();
    logger.info(String.format("String_Node_Str",currentName,sequenceName));
    if (currentName.equals(sequenceName)) {
      return currentName;
    }
    for (    AlignmentSequenceAlias sequenceAlias : sequences) {
      logger.info(String.format("String_Node_Str",sequenceAlias.alias,sequenceName));
      if (sequenceAlias.alias.equals(sequenceName)) {
        return sequenceAlias.name;
      }
    }
  }
  return null;
}

Fixed version (ground truth):
public String getActualSequenceName(int fileID,String sequenceName) throws Exception {
  Alignment alignment=alignmentStore.getAlignment(fileID);
  SAMFileReader file=alignment.getReader();
  List<AlignmentSequenceAlias> sequences=alignmentStore.getSequences();
  for (  SAMSequenceRecord ssr : file.getFileHeader().getSequenceDictionary().getSequences()) {
    String currentName=ssr.getSequenceName();
    if (currentName.equals(sequenceName)) {
      return currentName;
    }
    for (    AlignmentSequenceAlias sequenceAlias : sequences) {
      if (sequenceAlias.alias.equals(sequenceName)) {
        return sequenceAlias.name;
      }
    }
  }
  return null;
}
Program: 153298
Project: 153298
Buggy source:
public List<FileInfo> listwithsequence(String sequence) throws Exception {
  Map<Integer,Alignment> map=new HashMap<Integer,Alignment>();
  for (  Alignment alignment : alignmentStore.getAlignments()) {
    SAMFileReader file=alignment.getReader();
    Integer fileID=alignment.fileID;
    if (map.containsKey(fileID)) {
      continue;
    }
    for (    SAMSequenceRecord ssr : file.getFileHeader().getSequenceDictionary().getSequences()) {
      if (ssr.getSequenceName().equals(sequence) || this.getActualSequenceName(fileID,sequence) != null) {
        map.put(fileID,alignment);
        continue;
      }
    }
  }
  return list(new ArrayList<Alignment>(map.values()));
}

Fixed version (ground truth):
public List<FileInfo> listwithsequence(String sequence) throws Exception {
  Map<Integer,Alignment> map=new HashMap<Integer,Alignment>();
  for (  Alignment alignment : alignmentStore.getAlignments()) {
    SAMFileReader file=alignment.getReader();
    Integer fileID=alignment.fileID;
    if (map.containsKey(fileID)) {
      continue;
    }
    String actualSequenceName=getActualSequenceName(fileID,sequence);
    for (    SAMSequenceRecord ssr : file.getFileHeader().getSequenceDictionary().getSequences()) {
      if (actualSequenceName == null) {
        continue;
      }
      if (actualSequenceName.equals(ssr.getSequenceName())) {
        map.put(fileID,alignment);
      }
    }
  }
  return list(new ArrayList<Alignment>(map.values()));
}
Program: 153299
Project: 153299
Buggy source:
@Override public void start(Stage stage){
  stage.setTitle("String_Node_Str");
  Group container=new Group();
  Scene scene=new Scene(container,332,500);
  view=new ImageView();
  container.getChildren().add(view);
  service=new Service<Image>(){
    @Override protected Task createTask(){
      return new Task<Image>(){
        @Override protected Image call() throws Exception {
          return new Image("String_Node_Str",332.0,500.0,true,true);
        }
      }
;
    }
  }
;
  service.stateProperty().addListener(new ChangeListener<Worker.State>(){
    public void changed(    ObservableValue<? extends Worker.State> state,    Worker.State oldValue,    Worker.State newValue){
      if (newValue == Worker.State.SUCCEEDED) {
        Image image=service.getValue();
        view.setImage(image);
      }
    }
  }
);
  service.start();
  stage.setScene(scene);
  stage.show();
}

Fixed version (ground truth):
@Override public void start(Stage stage){
  stage.setTitle("String_Node_Str");
  Group container=new Group();
  Scene scene=new Scene(container,332,500);
  view=new ImageView();
  container.getChildren().add(view);
  service=new Service<Image>(){
    @Override protected Task createTask(){
      return new Task<Image>(){
        @Override protected Image call() throws Exception {
          return new Image("String_Node_Str",332.0,500.0,true,true);
        }
      }
;
    }
  }
;
  service.stateProperty().addListener(new ChangeListener<State>(){
    @Override public void changed(    ObservableValue<? extends State> state,    State oldValue,    State newValue){
      if (newValue == State.SUCCEEDED) {
        Image image=service.getValue();
        view.setImage(image);
      }
    }
  }
);
  service.start();
  stage.setScene(scene);
  stage.show();
}
Program: 153300
Project: 153300
Buggy source:
public void changed(ObservableValue<? extends Worker.State> state,Worker.State oldValue,Worker.State newValue){
  if (newValue == Worker.State.SUCCEEDED) {
    Image image=service.getValue();
    view.setImage(image);
  }
}

Fixed version (ground truth):
@Override public void changed(ObservableValue<? extends State> state,State oldValue,State newValue){
  if (newValue == State.SUCCEEDED) {
    Image image=service.getValue();
    view.setImage(image);
  }
}
Program: 153301
Project: 153301
Buggy source:
@Override public void start(Stage stage){
  stage.setTitle("String_Node_Str");
  Group container=new Group();
  Scene scene=new Scene(container,400,100);
  Rectangle rect=new Rectangle(50,10,50,30);
  rect.setFill(Color.RED);
  container.getChildren().add(rect);
  Slider slider=new Slider(50,300,0);
  slider.setPrefSize(300,30);
  slider.setLayoutX(50);
  slider.setLayoutY(60);
  container.getChildren().add(slider);
  rect.xProperty().bind(slider.valueProperty());
  stage.setScene(scene);
  stage.show();
}

Fixed version (ground truth):
@Override public void start(Stage stage){
  stage.setTitle("String_Node_Str");
  Group container=new Group();
  Scene scene=new Scene(container,400,100);
  Rectangle rect=new Rectangle(50,10,50,30);
  rect.setFill(Color.RED);
  container.getChildren().add(rect);
  rect.xProperty().bind(x);
  Slider slider=new Slider(50,300,0);
  slider.setPrefSize(300,30);
  slider.setLayoutX(50);
  slider.setLayoutY(60);
  container.getChildren().add(slider);
  x.bind(slider.valueProperty());
  stage.setScene(scene);
  stage.show();
}
Program: 153302
Project: 153302
Buggy source:
@Override public void start(Stage stage){
  stage.setTitle("String_Node_Str");
  Group container=new Group();
  Scene scene=new Scene(container,400,400);
  Random random=new Random();
  for (int i=0; i < 50; i++) {
    Circle circle=new Circle(random.nextInt(400),random.nextInt(400),random.nextInt(100));
    circle.setFill(new Color(random.nextDouble() * 0.5 + 0.5,random.nextDouble() * 0.5 + 0.5,random.nextDouble() * 0.5 + 0.5,random.nextDouble() * 0.8));
    circle.setEffect(new BoxBlur(10,10,1));
    container.getChildren().add(circle);
    FadeTransition transition=new FadeTransition(new Duration(random.nextInt(4000) + 1000),circle);
    transition.setAutoReverse(true);
    transition.setCycleCount(FadeTransition.INDEFINITE);
    transition.setFromValue(1.0);
    transition.setToValue(0.0);
    transition.play();
  }
  stage.setScene(scene);
  stage.show();
}

Fixed version (ground truth):
@Override public void start(Stage stage){
  stage.setTitle("String_Node_Str");
  Group container=new Group();
  Scene scene=new Scene(container,400,400);
  Random random=new Random();
  for (int i=0; i < 50; i++) {
    Circle circle=new Circle(random.nextInt(400),random.nextInt(400),random.nextInt(100));
    circle.setFill(new Color(random.nextDouble() * 0.5 + 0.5,random.nextDouble() * 0.5 + 0.5,random.nextDouble() * 0.5 + 0.5,random.nextDouble() * 0.8));
    circle.setEffect(new BoxBlur(10,10,1));
    container.getChildren().add(circle);
    FadeTransition transition=new FadeTransition(new Duration(random.nextInt(4000) + 1000),circle);
    transition.setAutoReverse(true);
    transition.setCycleCount(FadeTransition.INDEFINITE);
    transition.setInterpolator(Interpolator.EASE_BOTH);
    transition.setFromValue(1.0);
    transition.setToValue(0.0);
    transition.play();
  }
  stage.setScene(scene);
  stage.show();
}
Program: 153303
Project: 153303
Buggy source:
@Override public void start(Stage stage){
  Group container=new Group();
  Scene scene=new Scene(container,100,20);
  stage.setScene(scene);
  Label label=new Label("String_Node_Str");
  container.getChildren().add(label);
  stage.show();
}

Fixed version (ground truth):
@Override public void start(Stage stage){
  stage.setTitle("String_Node_Str");
  Group container=new Group();
  Scene scene=new Scene(container,100,20);
  stage.setScene(scene);
  Label label=new Label("String_Node_Str");
  container.getChildren().add(label);
  stage.show();
}
Program: 153305
Project: 153305
Buggy source:
@Override public void start(Stage stage){
  stage.setTitle("String_Node_Str");
  Group container=new Group();
  Scene scene=new Scene(container,400,100);
  rect=new Rectangle(10,60,50,30);
  rect.setFill(Color.RED);
  container.getChildren().add(rect);
  timeline=new Timeline();
  timeline.getKeyFrames().addAll(new KeyFrame(Duration.ZERO,new KeyValue(rect.translateXProperty(),0.0)),new KeyFrame(new Duration(1000),new KeyValue(rect.translateXProperty(),320.0)));
  Button button=new Button("String_Node_Str");
  button.setLayoutX(180);
  button.setLayoutY(10);
  container.getChildren().add(button);
  button.setOnAction(new EventHandler<ActionEvent>(){
    public void handle(    ActionEvent event){
      timeline.playFromStart();
    }
  }
);
  stage.setScene(scene);
  stage.show();
}

Fixed version (ground truth):
@Override public void start(Stage stage){
  stage.setTitle("String_Node_Str");
  Group container=new Group();
  Scene scene=new Scene(container,400,100);
  rect=new Rectangle(10,60,50,30);
  rect.setFill(Color.RED);
  container.getChildren().add(rect);
  timeline=new Timeline();
  timeline.getKeyFrames().addAll(new KeyFrame(Duration.ZERO,new KeyValue(rect.translateXProperty(),0.0)),new KeyFrame(new Duration(1000),new KeyValue(rect.translateXProperty(),320.0)));
  Button button=new Button("String_Node_Str");
  button.setLayoutX(180);
  button.setLayoutY(10);
  container.getChildren().add(button);
  button.setOnAction(new EventHandler<ActionEvent>(){
    @Override public void handle(    ActionEvent event){
      timeline.playFromStart();
    }
  }
);
  stage.setScene(scene);
  stage.show();
}
Program: 153306
Project: 153306
Buggy source:
public void handle(ActionEvent event){
  timeline.playFromStart();
}

Fixed version (ground truth):
@Override public void handle(ActionEvent event){
  timeline.playFromStart();
}
Program: 153307
Project: 153307
Buggy source:
@Override public void start(Stage stage){
  try {
    SwingUtilities.invokeAndWait(new Runnable(){
      public void run(){
        initSwing();
      }
    }
);
  }
 catch (  InvocationTargetException ex) {
    return;
  }
catch (  InterruptedException ex) {
    return;
  }
  FlowPane container=new FlowPane(10,10);
  container.setAlignment(Pos.CENTER);
  Scene scene=new Scene(container);
  Label label=new Label("String_Node_Str");
  TextField textField=new TextField("String_Node_Str");
  Button button=new Button("String_Node_Str");
  container.getChildren().addAll(label,textField,button);
  jfxPanel.setScene(scene);
}

Fixed version (ground truth):
@Override public void start(Stage stage){
  try {
    SwingUtilities.invokeAndWait(new Runnable(){
      @Override public void run(){
        initSwing();
      }
    }
);
  }
 catch (  InvocationTargetException ex) {
    return;
  }
catch (  InterruptedException ex) {
    return;
  }
  FlowPane container=new FlowPane(10,10);
  container.setAlignment(Pos.CENTER);
  Scene scene=new Scene(container);
  Label label=new Label("String_Node_Str");
  TextField textField=new TextField("String_Node_Str");
  Button button=new Button("String_Node_Str");
  container.getChildren().addAll(label,textField,button);
  jfxPanel.setScene(scene);
}
Program: 153308
Project: 153308
Buggy source:
public void run(){
  initSwing();
}

Fixed version (ground truth):
@Override public void run(){
  initSwing();
}
Program: 153309
Project: 153309
Buggy source:
@Override public void start(Stage stage){
  stage.setTitle("String_Node_Str");
  BorderPane borderPane=new BorderPane();
  borderPane.setLayoutY(10);
  borderPane.setLayoutX(10);
  Scene scene=new Scene(borderPane);
  stage.setScene(scene);
  WebView view=new WebView();
  engine=view.getEngine();
  view.setPrefSize(600,500);
  borderPane.setCenter(view);
  Reflection reflection=new Reflection();
  reflection.setFraction(0.5);
  view.setEffect(reflection);
  Worker worker=engine.getLoadWorker();
  worker.stateProperty().addListener(new ChangeListener<Worker.State>(){
    @Override public void changed(    ObservableValue<? extends Worker.State> state,    Worker.State oldValue,    Worker.State newValue){
      if (newValue == Worker.State.SUCCEEDED) {
        String url=engine.getLocation();
        if (url != null && !url.isEmpty()) {
          urlField.setText(url);
        }
      }
    }
  }
);
  HBox hbox=new HBox(10);
  hbox.setPrefHeight(40);
  hbox.setAlignment(Pos.BASELINE_CENTER);
  borderPane.setTop(hbox);
  EventHandler<ActionEvent> handler=new EventHandler<ActionEvent>(){
    @Override public void handle(    ActionEvent t){
      loadUrl();
    }
  }
;
  urlField=new TextField();
  urlField.setPrefColumnCount(40);
  urlField.setStyle("String_Node_Str");
  hbox.getChildren().add(urlField);
  urlField.setOnAction(handler);
  Button button=new Button("String_Node_Str");
  button.setFont(new Font("String_Node_Str",16));
  hbox.getChildren().add(button);
  button.setOnAction(handler);
  stage.show();
}

Fixed version (ground truth):
@Override public void start(Stage stage){
  stage.setTitle("String_Node_Str");
  BorderPane borderPane=new BorderPane();
  borderPane.setLayoutY(10);
  borderPane.setLayoutX(10);
  Scene scene=new Scene(borderPane);
  stage.setScene(scene);
  WebView view=new WebView();
  engine=view.getEngine();
  view.setPrefSize(600,500);
  borderPane.setCenter(view);
  Reflection reflection=new Reflection();
  reflection.setFraction(0.5);
  view.setEffect(reflection);
  Worker worker=engine.getLoadWorker();
  worker.stateProperty().addListener(new ChangeListener<Worker.State>(){
    @Override public void changed(    ObservableValue<? extends Worker.State> state,    Worker.State oldValue,    Worker.State newValue){
      if (newValue == Worker.State.SUCCEEDED) {
        String url=engine.getLocation();
        if (url != null && !url.isEmpty()) {
          urlField.setText(url);
        }
      }
    }
  }
);
  HBox hbox=new HBox(10);
  hbox.setPrefHeight(40);
  hbox.setAlignment(Pos.BASELINE_CENTER);
  borderPane.setTop(hbox);
  EventHandler<ActionEvent> handler=new EventHandler<ActionEvent>(){
    @Override public void handle(    ActionEvent t){
      loadUrl();
    }
  }
;
  urlField=new TextField();
  urlField.setPrefColumnCount(40);
  urlField.setStyle("String_Node_Str");
  hbox.getChildren().add(urlField);
  urlField.setOnAction(handler);
  Button button=new Button("String_Node_Str");
  button.setStyle("String_Node_Str");
  hbox.getChildren().add(button);
  button.setOnAction(handler);
  stage.show();
}
Program: 153310
Project: 153310
Buggy source:
@PreDestroy public void stop(){
  future.cancel(true);
}

Fixed version (ground truth):
@PreDestroy public synchronized void stop(){
  future.cancel(true);
}
Program: 153311
Project: 153311
Buggy source:
@PostConstruct public void start(){
  future=executor.scheduleAtFixedRate(new Runnable(){
    @Override public void run(){
      synchronize();
    }
  }
,0,(long)replicationInterval.toMillis(),TimeUnit.MILLISECONDS);
}

Fixed version (ground truth):
@PostConstruct public synchronized void start(){
  future=executor.scheduleAtFixedRate(new Runnable(){
    @Override public void run(){
      synchronize();
    }
  }
,0,(long)replicationInterval.toMillis(),TimeUnit.MILLISECONDS);
}
Program: 153312
Project: 153312
Buggy source:
@Inject public CassandraDynamicStore(CassandraStoreConfig config,CassandraServerInfo cassandraInfo,DiscoveryConfig discoveryConfig,NodeInfo nodeInfo,Provider<DateTime> currentTime){
  this.currentTime=currentTime;
  maxAge=discoveryConfig.getMaxAge();
  Cluster cluster=HFactory.getOrCreateCluster(CLUSTER,format("String_Node_Str",InetAddresses.toUriString(nodeInfo.getPublicIp()),cassandraInfo.getRpcPort()));
  String keyspaceName=config.getKeyspace();
  KeyspaceDefinition definition=cluster.describeKeyspace(keyspaceName);
  if (definition == null) {
    cluster.addKeyspace(new ThriftKsDef(keyspaceName));
  }
  if (cluster.describeKeyspace(keyspaceName).getCfDefs().isEmpty()) {
    cluster.addColumnFamily(new ThriftCfDef(keyspaceName,COLUMN_FAMILY));
  }
  keyspace=HFactory.createKeyspace(keyspaceName,cluster);
  keyspace.setConsistencyLevelPolicy(new AllOneConsistencyLevelPolicy());
}

Fixed version (ground truth):
@Inject public CassandraDynamicStore(CassandraStoreConfig config,CassandraServerInfo cassandraInfo,DiscoveryConfig discoveryConfig,NodeInfo nodeInfo,Provider<DateTime> currentTime){
  this.currentTime=currentTime;
  maxAge=discoveryConfig.getMaxAge();
  Cluster cluster=HFactory.getOrCreateCluster(CLUSTER,format("String_Node_Str",InetAddresses.toUriString(nodeInfo.getPublicIp()),cassandraInfo.getRpcPort()));
  String keyspaceName=config.getKeyspace();
  KeyspaceDefinition definition=cluster.describeKeyspace(keyspaceName);
  if (definition == null) {
    cluster.addKeyspace(new ThriftKsDef(keyspaceName));
  }
  boolean exists=false;
  for (  ColumnFamilyDefinition columnFamily : cluster.describeKeyspace(keyspaceName).getCfDefs()) {
    if (columnFamily.getName().equals(COLUMN_FAMILY)) {
      exists=true;
      break;
    }
  }
  if (!exists) {
    cluster.addColumnFamily(new ThriftCfDef(keyspaceName,COLUMN_FAMILY));
  }
  keyspace=HFactory.createKeyspace(keyspaceName,cluster);
  keyspace.setConsistencyLevelPolicy(new AllOneConsistencyLevelPolicy());
}
Program: 153313
Project: 153313
Buggy source:
@Inject public CassandraStaticStore(CassandraStoreConfig config,CassandraServerInfo cassandraInfo,NodeInfo nodeInfo){
  Cluster cluster=HFactory.getOrCreateCluster(CLUSTER,format("String_Node_Str",InetAddresses.toUriString(nodeInfo.getPublicIp()),cassandraInfo.getRpcPort()));
  String keyspaceName=config.getKeyspace();
  KeyspaceDefinition definition=cluster.describeKeyspace(keyspaceName);
  if (definition == null) {
    cluster.addKeyspace(new ThriftKsDef(keyspaceName));
  }
  if (cluster.describeKeyspace(keyspaceName).getCfDefs().isEmpty()) {
    cluster.addColumnFamily(new ThriftCfDef(keyspaceName,COLUMN_FAMILY));
  }
  keyspace=HFactory.createKeyspace(keyspaceName,cluster);
  keyspace.setConsistencyLevelPolicy(new QuorumAllConsistencyLevelPolicy());
}

Fixed version (ground truth):
@Inject public CassandraStaticStore(CassandraStoreConfig config,CassandraServerInfo cassandraInfo,NodeInfo nodeInfo){
  Cluster cluster=HFactory.getOrCreateCluster(CLUSTER,format("String_Node_Str",InetAddresses.toUriString(nodeInfo.getPublicIp()),cassandraInfo.getRpcPort()));
  String keyspaceName=config.getKeyspace();
  KeyspaceDefinition definition=cluster.describeKeyspace(keyspaceName);
  if (definition == null) {
    cluster.addKeyspace(new ThriftKsDef(keyspaceName));
  }
  boolean exists=false;
  for (  ColumnFamilyDefinition columnFamily : cluster.describeKeyspace(keyspaceName).getCfDefs()) {
    if (columnFamily.getName().equals(COLUMN_FAMILY)) {
      exists=true;
      break;
    }
  }
  if (!exists) {
    cluster.addColumnFamily(new ThriftCfDef(keyspaceName,COLUMN_FAMILY));
  }
  keyspace=HFactory.createKeyspace(keyspaceName,cluster);
  keyspace.setConsistencyLevelPolicy(new QuorumAllConsistencyLevelPolicy());
}
Program: 153314
Project: 153314
Buggy source:
public Set<Service> getAll(){
  List<Row<String,Long,String>> result=HFactory.createRangeSlicesQuery(keyspace,StringSerializer.get(),LongSerializer.get(),StringSerializer.get()).setColumnFamily(COLUMN_FAMILY).setKeys("String_Node_Str","String_Node_Str").setRange(Long.MAX_VALUE,System.currentTimeMillis() - (long)maxAge.toMillis(),true,1).execute().get().getList();
  ImmutableSet.Builder<Service> builder=new ImmutableSet.Builder<Service>();
  for (  Row<String,Long,String> row : result) {
    List<HColumn<Long,String>> columns=row.getColumnSlice().getColumns();
    if (!columns.isEmpty()) {
      builder.addAll(codec.fromJson(columns.iterator().next().getValue()));
    }
  }
  return builder.build();
}

Fixed version (ground truth):
public Set<Service> getAll(){
  List<Row<String,Long,String>> result=HFactory.createRangeSlicesQuery(keyspace,StringSerializer.get(),LongSerializer.get(),StringSerializer.get()).setColumnFamily(COLUMN_FAMILY).setKeys("String_Node_Str","String_Node_Str").setRange(Long.MAX_VALUE,expirationCutoff().getMillis(),true,1).execute().get().getList();
  ImmutableSet.Builder<Service> builder=new ImmutableSet.Builder<Service>();
  for (  Row<String,Long,String> row : result) {
    List<HColumn<Long,String>> columns=row.getColumnSlice().getColumns();
    if (!columns.isEmpty()) {
      builder.addAll(codec.fromJson(columns.iterator().next().getValue()));
    }
  }
  return builder.build();
}
Program: 153315
Project: 153315
Buggy source:
@Inject public CassandraStore(CassandraStoreConfig config,CassandraServerInfo cassandraInfo,DiscoveryConfig discoveryConfig,NodeInfo nodeInfo){
  maxAge=discoveryConfig.getMaxAge();
  Cluster cluster=HFactory.getOrCreateCluster(CLUSTER,format("String_Node_Str",InetAddresses.toUriString(nodeInfo.getPublicIp()),cassandraInfo.getRpcPort()));
  String keyspaceName=config.getKeyspace();
  KeyspaceDefinition definition=cluster.describeKeyspace(keyspaceName);
  if (definition == null) {
    cluster.addKeyspace(new ThriftKsDef(keyspaceName));
  }
  if (cluster.describeKeyspace(keyspaceName).getCfDefs().isEmpty()) {
    cluster.addColumnFamily(new ThriftCfDef(keyspaceName,COLUMN_FAMILY));
  }
  keyspace=HFactory.createKeyspace(keyspaceName,cluster);
  keyspace.setConsistencyLevelPolicy(new AllOneConsistencyLevelPolicy());
}

Fixed version (ground truth):
@Inject public CassandraStore(CassandraStoreConfig config,CassandraServerInfo cassandraInfo,DiscoveryConfig discoveryConfig,NodeInfo nodeInfo,Provider<DateTime> currentTime){
  this.currentTime=currentTime;
  maxAge=discoveryConfig.getMaxAge();
  Cluster cluster=HFactory.getOrCreateCluster(CLUSTER,format("String_Node_Str",InetAddresses.toUriString(nodeInfo.getPublicIp()),cassandraInfo.getRpcPort()));
  String keyspaceName=config.getKeyspace();
  KeyspaceDefinition definition=cluster.describeKeyspace(keyspaceName);
  if (definition == null) {
    cluster.addKeyspace(new ThriftKsDef(keyspaceName));
  }
  if (cluster.describeKeyspace(keyspaceName).getCfDefs().isEmpty()) {
    cluster.addColumnFamily(new ThriftCfDef(keyspaceName,COLUMN_FAMILY));
  }
  keyspace=HFactory.createKeyspace(keyspaceName,cluster);
  keyspace.setConsistencyLevelPolicy(new AllOneConsistencyLevelPolicy());
}
Program: 153316
Project: 153316
Buggy source:
private boolean exists(UUID nodeId){
  ColumnSlice<Long,String> slice=HFactory.createSliceQuery(keyspace,StringSerializer.get(),LongSerializer.get(),StringSerializer.get()).setColumnFamily(COLUMN_FAMILY).setKey(nodeId.toString()).setRange(System.currentTimeMillis() - (long)maxAge.toMillis(),Long.MAX_VALUE,false,1).execute().get();
  return !slice.getColumns().isEmpty();
}

Fixed version (ground truth):
private boolean exists(UUID nodeId){
  ColumnSlice<Long,String> slice=HFactory.createSliceQuery(keyspace,StringSerializer.get(),LongSerializer.get(),StringSerializer.get()).setColumnFamily(COLUMN_FAMILY).setKey(nodeId.toString()).setRange(expirationCutoff().getMillis(),Long.MAX_VALUE,false,1).execute().get();
  return !slice.getColumns().isEmpty();
}
Program: 153317
Project: 153317
Buggy source:
private void removeExpired(){
  OrderedRows<String,Long,String> rows=HFactory.createRangeSlicesQuery(keyspace,StringSerializer.get(),LongSerializer.get(),StringSerializer.get()).setColumnFamily(COLUMN_FAMILY).setKeys("String_Node_Str","String_Node_Str").setRange(-Long.MAX_VALUE,System.currentTimeMillis() - (long)maxAge.toMillis(),false,Integer.MAX_VALUE).execute().get();
  Mutator<String> mutator=HFactory.createMutator(keyspace,StringSerializer.get());
  for (  Row<String,Long,String> row : rows) {
    for (    HColumn<Long,String> column : row.getColumnSlice().getColumns()) {
      mutator.addDeletion(row.getKey(),COLUMN_FAMILY,column.getName());
    }
  }
  mutator.execute();
}

Fixed version (ground truth):
private void removeExpired(){
  OrderedRows<String,Long,String> rows=HFactory.createRangeSlicesQuery(keyspace,StringSerializer.get(),LongSerializer.get(),StringSerializer.get()).setColumnFamily(COLUMN_FAMILY).setKeys("String_Node_Str","String_Node_Str").setRange(0L,expirationCutoff().getMillis(),false,Integer.MAX_VALUE).execute().get();
  Mutator<String> mutator=HFactory.createMutator(keyspace,StringSerializer.get());
  for (  Row<String,Long,String> row : rows) {
    for (    HColumn<Long,String> column : row.getColumnSlice().getColumns()) {
      mutator.addDeletion(row.getKey(),COLUMN_FAMILY,column.getName());
    }
  }
  mutator.execute();
}
Program: 153318
Project: 153318
Buggy source:
@Override public boolean put(UUID nodeId,Set<Service> descriptors){
  boolean exists=exists(nodeId);
  String value=codec.toJson(ImmutableList.copyOf(descriptors));
  HFactory.createMutator(keyspace,StringSerializer.get()).addInsertion(nodeId.toString(),COLUMN_FAMILY,HFactory.createColumn(System.currentTimeMillis(),value,LongSerializer.get(),StringSerializer.get())).execute();
  return !exists;
}

Fixed version (ground truth):
@Override public boolean put(UUID nodeId,Set<Service> descriptors){
  boolean exists=exists(nodeId);
  String value=codec.toJson(ImmutableList.copyOf(descriptors));
  HFactory.createMutator(keyspace,StringSerializer.get()).addInsertion(nodeId.toString(),COLUMN_FAMILY,HFactory.createColumn(currentTime.get().getMillis(),value,LongSerializer.get(),StringSerializer.get())).execute();
  return !exists;
}
Program: 153319
Project: 153319
Buggy source:
public void configure(Binder binder){
  binder.bind(AnnouncementResource.class).in(Scopes.SINGLETON);
  binder.bind(ServiceResource.class).in(Scopes.SINGLETON);
  binder.bind(Store.class).to(CassandraStore.class).in(Scopes.SINGLETON);
  ConfigurationModule.bindConfig(binder).to(DiscoveryConfig.class);
  ConfigurationModule.bindConfig(binder).to(CassandraStoreConfig.class);
}

Fixed version (ground truth):
public void configure(Binder binder){
  binder.bind(AnnouncementResource.class).in(Scopes.SINGLETON);
  binder.bind(ServiceResource.class).in(Scopes.SINGLETON);
  binder.bind(Store.class).to(CassandraStore.class).in(Scopes.SINGLETON);
  binder.bind(DateTime.class).toProvider(RealTimeProvider.class).in(Scopes.SINGLETON);
  ConfigurationModule.bindConfig(binder).to(DiscoveryConfig.class);
  ConfigurationModule.bindConfig(binder).to(CassandraStoreConfig.class);
}
Program: 153320
Project: 153320
Buggy source:
@Override public Set<Service> getAll(){
  return ImmutableSet.copyOf(concat(descriptors.values()));
}

Fixed version (ground truth):
@Override public synchronized Set<Service> getAll(){
  removeExpired();
  ImmutableSet.Builder<Service> builder=new ImmutableSet.Builder<Service>();
  for (  Entry entry : descriptors.values()) {
    builder.addAll(entry.getServices());
  }
  return builder.build();
}
Program: 153321
Project: 153321
Buggy source:
@Override public Set<Service> get(String type,String pool){
  Preconditions.checkNotNull(type,"String_Node_Str");
  Preconditions.checkNotNull(pool,"String_Node_Str");
  return ImmutableSet.copyOf(filter(concat(descriptors.values()),and(matchesType(type),matchesPool(pool))));
}

Fixed version (ground truth):
@Override public synchronized Set<Service> get(String type,String pool){
  Preconditions.checkNotNull(type,"String_Node_Str");
  Preconditions.checkNotNull(pool,"String_Node_Str");
  return ImmutableSet.copyOf(filter(getAll(),and(matchesType(type),matchesPool(pool))));
}
Program: 153322
Project: 153322
Buggy source:
@Inject public InMemoryStore(DiscoveryConfig config){
  descriptors=new MapMaker().expireAfterWrite((long)config.getMaxAge().toMillis(),TimeUnit.MILLISECONDS).makeMap();
}

Fixed version (ground truth):
@Inject public InMemoryStore(DiscoveryConfig config,Provider<DateTime> timeSource){
  this.currentTime=timeSource;
  this.maxAge=config.getMaxAge();
}
Program: 153323
Project: 153323
Buggy source:
@Override public boolean delete(UUID nodeId){
  Preconditions.checkNotNull(nodeId,"String_Node_Str");
  return descriptors.remove(nodeId) != null;
}

Fixed version (ground truth):
@Override public synchronized boolean delete(UUID nodeId){
  Preconditions.checkNotNull(nodeId,"String_Node_Str");
  return descriptors.remove(nodeId) != null;
}
Program: 153324
Project: 153324
Buggy source:
@Override public boolean put(UUID nodeId,Set<Service> descriptors){
  Preconditions.checkNotNull(nodeId,"String_Node_Str");
  Preconditions.checkNotNull(descriptors,"String_Node_Str");
  Set<Service> old=this.descriptors.put(nodeId,ImmutableSet.copyOf(descriptors));
  return old == null;
}

Fixed version (ground truth):
@Override public synchronized boolean put(UUID nodeId,Set<Service> services){
  Preconditions.checkNotNull(nodeId,"String_Node_Str");
  Preconditions.checkNotNull(services,"String_Node_Str");
  DateTime expiration=currentTime.get().plusMillis((int)maxAge.toMillis());
  Entry old=descriptors.put(nodeId,new Entry(expiration,ImmutableSet.copyOf(services)));
  return old == null;
}
Program: 153325
Project: 153325
Buggy source:
@BeforeMethod public void setup(){
  store=new InMemoryStore(new DiscoveryConfig());
  resource=new AnnouncementResource(store,new NodeInfo("String_Node_Str"));
}

Fixed version (ground truth):
@BeforeMethod public void setup(){
  store=new InMemoryStore(new DiscoveryConfig(),new RealTimeProvider());
  resource=new AnnouncementResource(store,new NodeInfo("String_Node_Str"));
}
Program: 153326
Project: 153326
Buggy source:
@BeforeMethod protected void setUp(){
  store=new InMemoryStore(new DiscoveryConfig());
  resource=new ServiceResource(store,new NodeInfo("String_Node_Str"));
}

Fixed version (ground truth):
@BeforeMethod protected void setUp(){
  store=new InMemoryStore(new DiscoveryConfig(),new TestingTimeProvider());
  resource=new ServiceResource(store,new NodeInfo("String_Node_Str"));
}
Program: 153327
Project: 153327
Buggy source:
@Override public void onCreate(Bundle savedInstanceState){
  super.onCreate(savedInstanceState);
  mFileName=Environment.getExternalStorageDirectory().getAbsolutePath();
  mFileName+="String_Node_Str";
  LinearLayout ll=new LinearLayout(this);
  mRecordButton=new RecordButton(this);
  ll.addView(mRecordButton,new LinearLayout.LayoutParams(ViewGroup.LayoutParams.WRAP_CONTENT,ViewGroup.LayoutParams.WRAP_CONTENT,0));
  mPlayButton=new PlayButton(this);
  ll.addView(mPlayButton,new LinearLayout.LayoutParams(ViewGroup.LayoutParams.WRAP_CONTENT,ViewGroup.LayoutParams.WRAP_CONTENT,0));
  setContentView(ll);
}

Fixed version (ground truth):
@Override public void onCreate(Bundle savedInstanceState){
  super.onCreate(savedInstanceState);
  mFileName=data.GetNewAudioURL();
  LinearLayout ll=new LinearLayout(this);
  mRecordButton=new RecordButton(this);
  ll.addView(mRecordButton,new LinearLayout.LayoutParams(ViewGroup.LayoutParams.WRAP_CONTENT,ViewGroup.LayoutParams.WRAP_CONTENT,0));
  mPlayButton=new PlayButton(this);
  ll.addView(mPlayButton,new LinearLayout.LayoutParams(ViewGroup.LayoutParams.WRAP_CONTENT,ViewGroup.LayoutParams.WRAP_CONTENT,0));
  setContentView(ll);
}
Program: 153328
Project: 153328
Buggy source:
public void AudioRecordTest(){
  mFileName=Environment.getExternalStorageDirectory().getAbsolutePath();
  mFileName+="String_Node_Str";
}

Fixed version (ground truth):
public void AudioRecordTest(){
  mFileName=data.GetNewAudioURL();
}
Program: 153329
Project: 153329
Buggy source:
@Override public void onCreate(Bundle savedInstanceState){
  super.onCreate(savedInstanceState);
  setContentView(R.layout.camera);
  imageFilePath=Interview.data.GetPhotoURL();
}

Fixed version (ground truth):
@Override public void onCreate(Bundle savedInstanceState){
  super.onCreate(savedInstanceState);
  setContentView(R.layout.camera);
  imageFilePath=data.GetNewPhotoURL();
}
Program: 153330
Project: 153330
Buggy source:
private void getDrawables(){
  String[] images=Interview.data.GetPhotoURLs();
  imagePaths=new String[images.length];
  for (int i=0; i < images.length; i++) {
    DrawableManager dm=new DrawableManager();
    imagePaths[i]=images[i];
  }
}

Fixed version (ground truth):
private void getDrawables(){
  String[] images=data.GetPhotoURLs();
  imagePaths=new String[images.length];
  for (int i=0; i < images.length; i++) {
    DrawableManager dm=new DrawableManager();
    imagePaths[i]=images[i];
  }
}
Program: 153331
Project: 153331
Buggy source:
public void onItemSelected(AdapterView<?> parent,View view,int position,long id){
  String subjectName=parent.getItemAtPosition(position).toString();
  data.SetSubject(subjectName);
  TextView subjectview=(TextView)findViewById(R.id.subjectname);
  subjectview.setText(subjectName);
  Interview.data.SetSubject(subjectName);
}

Fixed version (ground truth):
public void onItemSelected(AdapterView<?> parent,View view,int position,long id){
  String subjectName=parent.getItemAtPosition(position).toString();
  data.SetSubject(subjectName);
  TextView subjectview=(TextView)findViewById(R.id.subjectname);
  subjectview.setText(subjectName);
  data.SetSubject(subjectName);
}
Program: 153333
Project: 153333
Buggy source:
public List<String> GetVideoURLs(){
  return null;
}

Fixed version (ground truth):
public String[] GetVideoURLs(){
  return GetListOfFilesInPath(Data.imageFolderPath());
}
Program: 153334
Project: 153334
Buggy source:
public String[] GetPhotoURLs(){
  File files=new File(imageFolderPath());
  String[] photos=files.list();
  for (int i=0; i < photos.length; i++) {
    photos[i]=Data.imageFolderPath() + "String_Node_Str" + photos[i];
  }
  return photos;
}

Fixed version (ground truth):
public String[] GetPhotoURLs(){
  return GetListOfFilesInPath(Data.imageFolderPath());
}
Program: 153335
Project: 153335
Buggy source:
private void createFolder(String folderPath){
  boolean success=(new File(folderPath)).mkdir();
}

Fixed version (ground truth):
private void createFolder(String folderPath){
  (new File(folderPath)).mkdir();
}
Program: 153336
Project: 153336
Buggy source:
public String GetNote(){
  return null;
}

Fixed version (ground truth):
public String GetNote(){
  return "String_Node_Str";
}
Program: 153337
Project: 153337
Buggy source:
public List<String> GetAudioURLs(){
  return null;
}

Fixed version (ground truth):
public String[] GetAudioURLs(){
  return GetListOfFilesInPath(Data.imageFolderPath());
}
Program: 153338
Project: 153338
Buggy source:
private static String subjectPath(){
  return root.getAbsolutePath() + "String_Node_Str" + Data.subject;
}

Fixed version (ground truth):
private static String subjectPath(){
  return root() + "String_Node_Str" + Data.subject;
}
Program: 153339
Project: 153339
Buggy source:
public String[] GetSubjects(){
  File files=new File(root.getAbsolutePath());
  return files.list();
}

Fixed version (ground truth):
public String[] GetSubjects(){
  File files=new File(root());
  return files.list();
}
Program: 153341
Project: 153341
Buggy source:
public void createSubject(String currentSubjectName){
}

Fixed version (ground truth):
public void createSubject(String currentSubjectName){
  String subjectDirectory=baseDirectory.getAbsolutePath() + File.separator + currentSubjectName;
  currentSubjectDirectory=new File(subjectDirectory);
  if (currentSubjectDirectory.exists()) {
    Toast.makeText(getApplicationContext(),"String_Node_Str",Toast.LENGTH_SHORT).show();
    return;
  }
  if (currentSubjectDirectory.mkdirs()) {
    String message="String_Node_Str" + currentSubjectName + "String_Node_Str";
    Toast.makeText(getApplicationContext(),message,Toast.LENGTH_SHORT).show();
  }
 else {
    Toast.makeText(getApplicationContext(),"String_Node_Str",Toast.LENGTH_SHORT).show();
  }
}
Program: 153342
Project: 153342
Buggy source:
@Override public void addDelegate(Triple obj){
  try {
    sesameGraph.add(RDFGraph2SesameGraph.extractAsSesameStatement(obj,null));
  }
 catch (  Exception e) {
  }
}

Fixed version (ground truth):
@Override public void addDelegate(Triple obj){
  try {
    sesameGraph.add(RDFGraph2SesameGraph.extractAsSesameStatement(obj,null,new ValueFactoryImpl()));
  }
 catch (  Exception e) {
  }
}
Program: 153343
Project: 153343
Buggy source:
public static Graph extract(Iterable<Triple> triples,String namedGraph){
  final Graph aGraph=new GraphImpl();
  for (  Triple triple : triples) {
    Statement aStatement=extractAsSesameStatement(triple,namedGraph);
    if (aStatement != null) {
      aGraph.add(aStatement);
    }
  }
  return aGraph;
}

Fixed version (ground truth):
public static Graph extract(Iterable<Triple> triples,String namedGraph){
  final Graph aGraph=new GraphImpl();
  final ValueFactory valueFactory=new ValueFactoryImpl();
  for (  Triple triple : triples) {
    Statement aStatement=extractAsSesameStatement(triple,namedGraph,valueFactory);
    if (aStatement != null) {
      aGraph.add(aStatement);
    }
  }
  return aGraph;
}
Program: 153344
Project: 153344
Buggy source:
private static org.openrdf.model.Resource asSesameResource(URIElement aNode){
  return sesameFactory.createURI(aNode.getURI());
}

Fixed version (ground truth):
private static org.openrdf.model.Resource asSesameResource(URIElement aNode,ValueFactory valueFactory){
  return valueFactory.createURI(aNode.getURI());
}
Program: 153345
Project: 153345
Buggy source:
public static Statement extractAsSesameStatement(Triple triple,String namedGraph){
  final org.openrdf.model.Resource aResource=asSesameResource(triple.getSubject());
  final URI aURI=asSesameURI(triple.getPredicate());
  final Value aValue=asSesameValue(triple.getObject());
  return (aResource != null && aURI != null && aValue != null) ? (namedGraph == null) ? sesameFactory.createStatement(aResource,aURI,aValue) : sesameFactory.createStatement(aResource,aURI,aValue,sesameFactory.createURI(namedGraph)) : null;
}

Fixed version (ground truth):
public static Statement extractAsSesameStatement(Triple triple,String namedGraph,ValueFactory valueFactory){
  final org.openrdf.model.Resource aResource=asSesameResource(triple.getSubject(),valueFactory);
  final URI aURI=asSesameURI(triple.getPredicate());
  final Value aValue=asSesameValue(triple.getObject(),valueFactory);
  return (aResource != null && aURI != null && aValue != null) ? (namedGraph == null) ? valueFactory.createStatement(aResource,aURI,aValue) : valueFactory.createStatement(aResource,aURI,aValue,valueFactory.createURI(namedGraph)) : null;
}
Program: 153346
Project: 153346
Buggy source:
private static Value asSesameValue(Node aNode){
  Value value=null;
  if (aNode instanceof Resource || aNode instanceof NamedGraph || aNode instanceof TripleNode) {
    value=asSesameResource((URIElement)aNode);
  }
 else   if (aNode instanceof BlankNode) {
    value=sesameFactory.createBNode();
  }
 else   if (aNode instanceof Literal) {
    Literal aLiteral=(Literal)aNode;
    if (aLiteral.getLang() != null && !aLiteral.getLang().trim().isEmpty()) {
      value=sesameFactory.createLiteral(aLiteral.getLexicalForm(),aLiteral.getLang());
    }
 else     if (aLiteral.getDatatype() != null) {
      value=sesameFactory.createLiteral(aLiteral.getLexicalForm(),sesameFactory.createURI(aLiteral.getDatatype().getURI()));
    }
 else {
      value=sesameFactory.createLiteral(aLiteral.getLexicalForm());
    }
  }
  return value;
}

Fixed version (ground truth):
private static Value asSesameValue(Node aNode,ValueFactory valueFactory){
  Value value=null;
  if (aNode instanceof Resource || aNode instanceof NamedGraph || aNode instanceof TripleNode) {
    value=asSesameResource((URIElement)aNode,valueFactory);
  }
 else   if (aNode instanceof BlankNode) {
    value=valueFactory.createBNode();
  }
 else   if (aNode instanceof Literal) {
    Literal aLiteral=(Literal)aNode;
    if (aLiteral.getLang() != null && !aLiteral.getLang().trim().isEmpty()) {
      value=valueFactory.createLiteral(aLiteral.getLexicalForm(),aLiteral.getLang());
    }
 else     if (aLiteral.getDatatype() != null) {
      value=valueFactory.createLiteral(aLiteral.getLexicalForm(),valueFactory.createURI(aLiteral.getDatatype().getURI()));
    }
 else {
      value=valueFactory.createLiteral(aLiteral.getLexicalForm());
    }
  }
  return value;
}
Program: 153348
Project: 153348
Buggy source:
@Configuration public static Option[] configuration(){
}

Fixed version (ground truth):
@Configuration public static Option[] configuration(){
  return options(felix(),mavenConfiguration(),wrappedBundle(mavenBundle("String_Node_Str","String_Node_Str").version("String_Node_Str")));
}
Program: 153349
Project: 153349
Buggy source:
@SuppressWarnings("String_Node_Str") private void archiveWorkspace(final AbstractBuild build,FilePath ws) throws IOException, InterruptedException {
  File archiveFile=getArchiveFile(build);
  final OutputStream os=new RemoteOutputStream(new FileOutputStream(archiveFile));
  ws.act(new FileCallable<Void>(){
    public Void invoke(    File ws,    VirtualChannel channel) throws IOException {
      ZipOutputStream zos=new ZipOutputStream(new BufferedOutputStream(os));
      if (flatten) {
        archive(ws,ParamUtils.populateParamValues(getModuleLocations()[0].getModule(),build.getBuildVariables()),zos,true);
      }
 else {
        for (        ModuleLocation moduleLocation : getModuleLocations()) {
          String module=ParamUtils.populateParamValues(moduleLocation.getLocalDir(),build.getBuildVariables());
          File mf=new File(ws,module);
          if (!mf.exists()) {
            continue;
          }
          if (!mf.isDirectory()) {
            int idx=module.lastIndexOf('/');
            if (idx == -1) {
              throw new Error("String_Node_Str" + module);
            }
            module=module.substring(0,idx);
            mf=mf.getParentFile();
          }
          archive(mf,module,zos,true);
        }
      }
      zos.close();
      return null;
    }
  }
);
}

Fixed version (ground truth):
@SuppressWarnings("String_Node_Str") private void archiveWorkspace(final AbstractBuild build,FilePath ws) throws IOException, InterruptedException {
  File archiveFile=getArchiveFile(build);
  final OutputStream os=new RemoteOutputStream(new FileOutputStream(archiveFile));
  ws.act(new FileCallable<Void>(){
    public Void invoke(    File ws,    VirtualChannel channel) throws IOException {
      ZipOutputStream zos=new ZipOutputStream(new BufferedOutputStream(os));
      if (flatten) {
        archive(ws,getModuleLocations()[0].getModule(),zos,true);
      }
 else {
        for (        ModuleLocation moduleLocation : getModuleLocations()) {
          File mf=new File(ws,moduleLocation.getLocalDir());
          if (!mf.exists()) {
            continue;
          }
          if (!mf.isDirectory()) {
            int idx=module.lastIndexOf('/');
            if (idx == -1) {
              throw new Error("String_Node_Str" + module);
            }
            module=module.substring(0,idx);
            mf=mf.getParentFile();
          }
          archive(mf,module,zos,true);
        }
      }
      zos.close();
      return null;
    }
  }
);
}
Program: 153350
Project: 153350
Buggy source:
@DataBoundConstructor public CVSSCM(String cvsRoot,String allModules,String branch,String cvsRsh,boolean canUseUpdate,boolean legacy,boolean isTag,String excludedRegions){
  if (fixNull(branch).equals("String_Node_Str")) {
    branch=null;
  }
  this.cvsroot=fixNull(cvsRoot).trim();
  this.module=allModules.trim();
  this.branch=nullify(branch);
  this.cvsRsh=nullify(cvsRsh);
  this.canUseUpdate=canUseUpdate;
  this.flatten=!legacy && getAllModulesNormalized().length == 1;
  this.isTag=isTag;
  this.excludedRegions=excludedRegions;
}

Fixed version (ground truth):
@DataBoundConstructor public CVSSCM(String cvsRoot,String allModules,String branch,String cvsRsh,boolean canUseUpdate,boolean legacy,boolean isTag,String excludedRegions,boolean preventLineEndingConversion){
  if (fixNull(branch).equals("String_Node_Str")) {
    branch=null;
  }
  this.cvsroot=fixNull(cvsRoot).trim();
  this.module=allModules.trim();
  this.branch=nullify(branch);
  this.cvsRsh=nullify(cvsRsh);
  this.canUseUpdate=canUseUpdate;
  this.flatten=!legacy && getAllModulesNormalized().length == 1;
  this.isTag=isTag;
  this.excludedRegions=excludedRegions;
  this.preventLineEndingConversion=preventLineEndingConversion;
}
Program: 153352
Project: 153352
Buggy source:
private boolean checkout(Launcher launcher,FilePath dir,TaskListener listener,Date dt) throws IOException, InterruptedException {
  dir.deleteContents();
  ArgumentListBuilder cmd=new ArgumentListBuilder();
  cmd.add(getDescriptor().getCvsExeOrDefault(),noQuiet ? null : (debug ? "String_Node_Str" : "String_Node_Str"),compression(),"String_Node_Str",cvsroot,"String_Node_Str","String_Node_Str");
  if (branch != null) {
    cmd.add("String_Node_Str",branch);
  }
  if (flatten) {
    cmd.add("String_Node_Str",dir.getName());
  }
  configureDate(cmd,dt);
  cmd.add(getAllModulesNormalized());
  if (!run(launcher,cmd,listener,flatten ? dir.getParent() : dir)) {
    return false;
  }
  if (flatten) {
    dir.act(new StickyDateCleanUpTask());
  }
 else {
    for (    String module : getAllModulesNormalized()) {
      dir.child(module).act(new StickyDateCleanUpTask());
    }
  }
  return true;
}

Fixed version (ground truth):
private boolean checkout(Launcher launcher,FilePath dir,TaskListener listener,Date dt) throws IOException, InterruptedException {
  dir.deleteContents();
  ArgumentListBuilder cmd=new ArgumentListBuilder();
  cmd.add(getDescriptor().getCvsExeOrDefault(),noQuiet ? null : (debug ? "String_Node_Str" : "String_Node_Str"),compression(),"String_Node_Str",cvsroot,"String_Node_Str","String_Node_Str");
  if (branch != null) {
    cmd.add("String_Node_Str",branch);
  }
  if (flatten) {
    cmd.add("String_Node_Str",dir.getName());
  }
  configureDate(cmd,dt);
  if (preventLineEndingConversion) {
    cmd.add("String_Node_Str");
  }
  cmd.add(getAllModulesNormalized());
  if (!run(launcher,cmd,listener,flatten ? dir.getParent() : dir)) {
    return false;
  }
  if (flatten) {
    dir.act(new StickyDateCleanUpTask());
  }
 else {
    for (    String module : getAllModulesNormalized()) {
      dir.child(module).act(new StickyDateCleanUpTask());
    }
  }
  return true;
}
Program: 153353
Project: 153353
Buggy source:
public Descriptor<TagAction> getDescriptor(){
  return Hudson.getInstance().getDescriptorOrDie(getClass());
}

Fixed version (ground truth):
public Descriptor<TagAction> getDescriptor(){
  return Hudson.getInstance().getDescriptorOrDie(TagAction.class);
}