nus-yam/ex-repair huggingface dataset:
Program: 188392
Project: 188392
Buggy source:
private static void runSolrQuery(List<String> args){
  String collection=args.get(2);
  String solrQueryString=args.get(3);
  try {
    QueryResponse executeSolrQuery=SolrUtils.executeSolrQuery(solr,collection,solrQueryString);
    SolrDocumentList results=executeSolrQuery.getResults();
    System.out.println("String_Node_Str" + results.getNumFound() + "String_Node_Str"+ results.size());
    for (    SolrDocument solrDocument : results) {
      System.out.println("String_Node_Str" + solrDocument);
    }
  }
 catch (  SolrServerException|IOException e) {
    e.printStackTrace();
  }
}

Fixed version (ground truth):
private static void runSolrQuery(List<String> args){
  String collection=args.get(2);
  String solrQueryString=args.get(3);
  try {
    QueryResponse executeSolrQuery=SolrUtils.executeSolrQuery(solr,collection,solrQueryString);
    SolrDocumentList results=executeSolrQuery.getResults();
    System.out.println("String_Node_Str" + results.getNumFound() + "String_Node_Str"+ results.size());
    for (    SolrDocument solrDocument : results) {
      System.out.println("String_Node_Str" + solrDocument);
    }
  }
 catch (  SolrServerException|IOException e) {
    e.printStackTrace(System.err);
  }
}
Program: 188393
Project: 188393
Buggy source:
private static Permissions getPermissions(SolrDocument doc){
  Permissions permissions=new Permissions();
  EnumMap<PermissionType,Set<String>> userPermissions=new EnumMap<>(PermissionType.class);
  for (  PermissionType type : PermissionType.values()) {
    String key=RodaConstants.INDEX_PERMISSION_USERS_PREFIX + type;
    Set<String> users=new HashSet<>();
    users.addAll(objectToListString(doc.get(key)));
    userPermissions.put(type,users);
  }
  Map<PermissionType,Set<String>> groupPermissions=new EnumMap<>(PermissionType.class);
  for (  PermissionType type : PermissionType.values()) {
    String key=RodaConstants.INDEX_PERMISSION_GROUPS_PREFIX + type;
    Set<String> groups=new HashSet<>();
    groups.addAll(objectToListString(doc.get(key)));
    groupPermissions.put(type,groups);
  }
  permissions.setUsers(userPermissions);
  permissions.setGroups(groupPermissions);
  return permissions;
}

Fixed version (ground truth):
private static Permissions getPermissions(SolrDocument doc){
  Permissions permissions=new Permissions();
  EnumMap<PermissionType,Set<String>> userPermissions=new EnumMap<>(PermissionType.class);
  for (  PermissionType type : PermissionType.values()) {
    String key=RodaConstants.INDEX_PERMISSION_USERS_PREFIX + type;
    Set<String> users=new HashSet<>();
    users.addAll(objectToListString(doc.get(key)));
    userPermissions.put(type,users);
  }
  EnumMap<PermissionType,Set<String>> groupPermissions=new EnumMap<>(PermissionType.class);
  for (  PermissionType type : PermissionType.values()) {
    String key=RodaConstants.INDEX_PERMISSION_GROUPS_PREFIX + type;
    Set<String> groups=new HashSet<>();
    groups.addAll(objectToListString(doc.get(key)));
    groupPermissions.put(type,groups);
  }
  permissions.setUsers(userPermissions);
  permissions.setGroups(groupPermissions);
  return permissions;
}
Program: 188394
Project: 188394
Buggy source:
public static <T extends IsIndexed>List<String> getClassLiteFields(Class<T> classToRetrieve){
  List<String> ret;
  if (liteFieldsForEachClass.containsKey(classToRetrieve.getName())) {
    ret=liteFieldsForEachClass.get(classToRetrieve.getName());
  }
 else {
    try {
      ret=((T)classToRetrieve.newInstance()).liteFields();
      liteFieldsForEachClass.put(classToRetrieve.getName(),ret);
    }
 catch (    InstantiationException|IllegalAccessException e) {
      LOGGER.error("String_Node_Str",classToRetrieve.getName(),e);
      ret=new ArrayList<>();
    }
  }
  return ret;
}

Fixed version (ground truth):
public static <T extends IsIndexed>List<String> getClassLiteFields(Class<T> classToRetrieve){
  List<String> ret;
  if (liteFieldsForEachClass.containsKey(classToRetrieve.getName())) {
    ret=liteFieldsForEachClass.get(classToRetrieve.getName());
  }
 else {
    try {
      ret=classToRetrieve.newInstance().liteFields();
      liteFieldsForEachClass.put(classToRetrieve.getName(),ret);
    }
 catch (    InstantiationException|IllegalAccessException e) {
      LOGGER.error("String_Node_Str",classToRetrieve.getName(),e);
      ret=new ArrayList<>();
    }
  }
  return ret;
}
Program: 188395
Project: 188395
Buggy source:
/** 
 * @deprecated use {@link #objectToString(Object,String)} instead
 */
private static String objectToString(Object object){
  String ret;
  if (object == null) {
    ret=null;
  }
 else   if (object instanceof String) {
    ret=(String)object;
  }
 else {
    LOGGER.warn("String_Node_Str",object.getClass().getName());
    ret=object.toString();
  }
  return ret;
}

Fixed version (ground truth):
/** 
 * @deprecated use {@link #objectToString(Object,String)} instead
 */
@Deprecated private static String objectToString(Object object){
  String ret;
  if (object == null) {
    ret=null;
  }
 else   if (object instanceof String) {
    ret=(String)object;
  }
 else {
    LOGGER.warn("String_Node_Str",object.getClass().getName());
    ret=object.toString();
  }
  return ret;
}
Program: 188396
Project: 188396
Buggy source:
@Override public boolean equals(Object obj){
  if (this == obj) {
    return true;
  }
  if (!super.equals(obj) || obj == null || getClass() != obj.getClass()) {
    return false;
  }
  DefaultBinary other=(DefaultBinary)obj;
  if (content == null) {
    if (other.content != null) {
      return false;
    }
  }
 else   if (!content.equals(other.content)) {
    return false;
  }
  if (contentDigest == null) {
    if (other.contentDigest != null) {
      return false;
    }
  }
 else   if (!contentDigest.equals(other.contentDigest)) {
    return false;
  }
  if (reference != other.reference) {
    return false;
  }
  if (sizeInBytes == null) {
    if (other.sizeInBytes != null) {
      return false;
    }
  }
 else   if (!sizeInBytes.equals(other.sizeInBytes)) {
    return false;
  }
  return true;
}

Fixed version (ground truth):
@Override public boolean equals(Object obj){
  if (this == obj) {
    return true;
  }
  if (obj == null) {
    return false;
  }
  if (!super.equals(obj) || getClass() != obj.getClass()) {
    return false;
  }
  DefaultBinary other=(DefaultBinary)obj;
  if (content == null) {
    if (other.content != null) {
      return false;
    }
  }
 else   if (!content.equals(other.content)) {
    return false;
  }
  if (contentDigest == null) {
    if (other.contentDigest != null) {
      return false;
    }
  }
 else   if (!contentDigest.equals(other.contentDigest)) {
    return false;
  }
  if (reference != other.reference) {
    return false;
  }
  if (sizeInBytes == null) {
    if (other.sizeInBytes != null) {
      return false;
    }
  }
 else   if (!sizeInBytes.equals(other.sizeInBytes)) {
    return false;
  }
  return true;
}
Program: 188397
Project: 188397
Buggy source:
@Override public void onChange(ChangeEvent changeEvent){
  String typeString=null;
  String version="String_Node_Str";
  String value=type.getSelectedValue();
  if (value.contains(RodaConstants.METADATA_VERSION_SEPARATOR) && bundle.getVersion() != null) {
    typeString=value.substring(0,value.lastIndexOf(RodaConstants.METADATA_VERSION_SEPARATOR));
    version=value.substring(value.lastIndexOf(RodaConstants.METADATA_VERSION_SEPARATOR) + 1,value.length());
  }
  if (typeString == null) {
    typeString=value;
  }
  BrowserService.Util.getInstance().retrieveDescriptiveMetadataEditBundle(aipId,representationId,bundle.getId(),typeString,version,LocaleInfo.getCurrentLocale().getLocaleName(),new AsyncCallback<DescriptiveMetadataEditBundle>(){
    @Override public void onFailure(    Throwable caught){
      AsyncCallbackUtils.defaultFailureTreatment(caught);
    }
    @Override public void onSuccess(    DescriptiveMetadataEditBundle editBundle){
      bundle=editBundle;
      HashSet<MetadataValue> newValues=null;
      if (bundle.getValues() != null) {
        newValues=new HashSet<>();
        for (        MetadataValue mv : bundle.getValues())         newValues.add(mv.clone());
      }
      supportedBundle=new SupportedMetadataTypeBundle(bundle.getId(),bundle.getType(),bundle.getVersion(),bundle.getId(),bundle.getRawTemplate(),newValues);
      updateFormOrXML();
    }
  }
);
}

Fixed version (ground truth):
@Override public void onChange(ChangeEvent changeEvent){
  String typeString=null;
  String version="String_Node_Str";
  String value=type.getSelectedValue();
  if (value.contains(RodaConstants.METADATA_VERSION_SEPARATOR) && bundle.getVersion() != null) {
    typeString=value.substring(0,value.lastIndexOf(RodaConstants.METADATA_VERSION_SEPARATOR));
    version=value.substring(value.lastIndexOf(RodaConstants.METADATA_VERSION_SEPARATOR) + 1,value.length());
  }
  if (typeString == null) {
    typeString=value;
  }
  BrowserService.Util.getInstance().retrieveDescriptiveMetadataEditBundle(aipId,representationId,bundle.getId(),typeString,version,LocaleInfo.getCurrentLocale().getLocaleName(),new AsyncCallback<DescriptiveMetadataEditBundle>(){
    @Override public void onFailure(    Throwable caught){
      AsyncCallbackUtils.defaultFailureTreatment(caught);
    }
    @Override public void onSuccess(    DescriptiveMetadataEditBundle editBundle){
      bundle=editBundle;
      HashSet<MetadataValue> newValues=null;
      if (bundle.getValues() != null) {
        newValues=new HashSet<>();
        for (        MetadataValue mv : bundle.getValues())         newValues.add(mv.copy());
      }
      supportedBundle=new SupportedMetadataTypeBundle(bundle.getId(),bundle.getType(),bundle.getVersion(),bundle.getId(),bundle.getRawTemplate(),newValues);
      updateFormOrXML();
    }
  }
);
}
Program: 188399
Project: 188399
Buggy source:
/** 
 * Creates a new MetadataValue object.
 * @param id The id of the MetadataValue object.
 * @param options The options map of the MetadataValue
 */
public MetadataValue(String id,HashMap<String,String> options){
  this.id=id;
  if (options == null || options.isEmpty()) {
    this.options=new HashMap<>();
  }
 else {
    this.options=options;
  }
  if (!this.options.containsKey("String_Node_Str")) {
    this.options.put("String_Node_Str",getTitle(id));
  }
}

Fixed version (ground truth):
/** 
 * Creates a new MetadataValue object.
 * @param id The id of the MetadataValue object.
 * @param options The options map of the MetadataValue
 */
public MetadataValue(String id,HashMap<String,String> options){
  this.id=id;
  if (options == null || options.isEmpty()) {
    this.options=new HashMap<>();
  }
 else {
    this.options=options;
  }
  if (!this.options.containsKey("String_Node_Str")) {
    this.options.put("String_Node_Str",id);
  }
}
Program: 188400
Project: 188400
Buggy source:
private Pair(K first,V second){
  this.first=first;
  this.second=second;
}

Fixed version (ground truth):
/** 
 * Instead of using this construtor, the of function should be used
 */
public Pair(K first,V second){
  this.first=first;
  this.second=second;
}
Program: 188403
Project: 188403
Buggy source:
public void setObjects(List<Format> formats){
  this.formatList=formats;
}

Fixed version (ground truth):
@Override public void setObjects(List<Format> formats){
  this.formatList=formats;
}
Program: 188404
Project: 188404
Buggy source:
public void addObject(Format format){
  this.formatList.add(format);
}

Fixed version (ground truth):
@Override public void addObject(Format format){
  this.formatList.add(format);
}
Program: 188405
Project: 188405
Buggy source:
@JsonProperty(value=RodaConstants.RODA_OBJECT_FORMATS) @XmlElement(name=RodaConstants.RODA_OBJECT_FORMAT) public List<Format> getObjects(){
  return formatList;
}

Fixed version (ground truth):
@Override @JsonProperty(value=RodaConstants.RODA_OBJECT_FORMATS) @XmlElement(name=RodaConstants.RODA_OBJECT_FORMAT) public List<Format> getObjects(){
  return formatList;
}
Program: 188406
Project: 188406
Buggy source:
public String toString(){
  return "String_Node_Str" + this.query + "String_Node_Str"+ this.parameters+ "String_Node_Str";
}

Fixed version (ground truth):
@Override public String toString(){
  return "String_Node_Str" + this.query + "String_Node_Str"+ this.parameters+ "String_Node_Str";
}
Program: 188407
Project: 188407
Buggy source:
/** 
 * @see Object#toString()
 */
public String toString(){
  return "String_Node_Str" + getName() + "String_Node_Str"+ getValue()+ "String_Node_Str";
}

Fixed version (ground truth):
/** 
 * @see Object#toString()
 */
@Override public String toString(){
  return "String_Node_Str" + getName() + "String_Node_Str"+ getValue()+ "String_Node_Str";
}
Program: 188408
Project: 188408
Buggy source:
/** 
 * @see Object#toString()
 */
public String toString(){
  return "String_Node_Str" + getName() + "String_Node_Str"+ getExpression()+ "String_Node_Str";
}

Fixed version (ground truth):
/** 
 * @see Object#toString()
 */
@Override public String toString(){
  return "String_Node_Str" + getName() + "String_Node_Str"+ getExpression()+ "String_Node_Str";
}
Program: 188409
Project: 188409
Buggy source:
/** 
 * @see Object#toString()
 */
public String toString(){
  return "String_Node_Str" + getName() + "String_Node_Str"+ getValue()+ "String_Node_Str";
}

Fixed version (ground truth):
/** 
 * @see Object#toString()
 */
@Override public String toString(){
  return "String_Node_Str" + getName() + "String_Node_Str"+ getValue()+ "String_Node_Str";
}
Program: 188410
Project: 188410
Buggy source:
/** 
 * @see Object#toString()
 */
public String toString(){
  return "String_Node_Str" + getName() + "String_Node_Str"+ getValues()+ "String_Node_Str";
}

Fixed version (ground truth):
/** 
 * @see Object#toString()
 */
@Override public String toString(){
  return "String_Node_Str" + getName() + "String_Node_Str"+ getValues()+ "String_Node_Str";
}
Program: 188411
Project: 188411
Buggy source:
/** 
 * @see Object#toString()
 */
public String toString(){
  return "String_Node_Str" + getName() + "String_Node_Str"+ getFromValue()+ "String_Node_Str"+ getToValue()+ "String_Node_Str";
}

Fixed version (ground truth):
/** 
 * @see Object#toString()
 */
@Override public String toString(){
  return "String_Node_Str" + getName() + "String_Node_Str"+ getFromValue()+ "String_Node_Str"+ getToValue()+ "String_Node_Str";
}
Program: 188412
Project: 188412
Buggy source:
/** 
 * @see Object#toString()
 */
public String toString(){
  return "String_Node_Str" + getName() + "String_Node_Str"+ getRegex()+ "String_Node_Str";
}

Fixed version (ground truth):
/** 
 * @see Object#toString()
 */
@Override public String toString(){
  return "String_Node_Str" + getName() + "String_Node_Str"+ getRegex()+ "String_Node_Str";
}
Program: 188413
Project: 188413
Buggy source:
/** 
 * @see Object#toString()
 */
public String toString(){
  return "String_Node_Str" + getName() + "String_Node_Str"+ getValue()+ "String_Node_Str";
}

Fixed version (ground truth):
/** 
 * @see Object#toString()
 */
@Override public String toString(){
  return "String_Node_Str" + getName() + "String_Node_Str"+ getValue()+ "String_Node_Str";
}
Program: 188414
Project: 188414
Buggy source:
public void setPermissions(Permissions permissions){
  this.permissions=permissions;
}

Fixed version (ground truth):
@Override public void setPermissions(Permissions permissions){
  this.permissions=permissions;
}
Program: 188415
Project: 188415
Buggy source:
public Permissions getPermissions(){
  return permissions;
}

Fixed version (ground truth):
@Override public Permissions getPermissions(){
  return permissions;
}
Program: 188416
Project: 188416
Buggy source:
public void setObjects(List<TransferredResource> resources){
  this.resources=resources;
}

Fixed version (ground truth):
@Override public void setObjects(List<TransferredResource> resources){
  this.resources=resources;
}
Program: 188417
Project: 188417
Buggy source:
public void addObject(TransferredResource resource){
  this.resources.add(resource);
}

Fixed version (ground truth):
@Override public void addObject(TransferredResource resource){
  this.resources.add(resource);
}
Program: 188418
Project: 188418
Buggy source:
@JsonProperty(value=RodaConstants.RODA_OBJECT_TRANSFERRED_RESOURCES) @XmlElement(name=RodaConstants.RODA_OBJECT_TRANSFERRED_RESOURCE) public List<TransferredResource> getObjects(){
  return resources;
}

Fixed version (ground truth):
@Override @JsonProperty(value=RodaConstants.RODA_OBJECT_TRANSFERRED_RESOURCES) @XmlElement(name=RodaConstants.RODA_OBJECT_TRANSFERRED_RESOURCE) public List<TransferredResource> getObjects(){
  return resources;
}
Program: 188419
Project: 188419
Buggy source:
public String getId(){
  return id;
}

Fixed version (ground truth):
@Override public String getId(){
  return id;
}
Program: 188420
Project: 188420
Buggy source:
@Override public PluginType getType(){
  return PluginType.MISC;
}

Fixed version (ground truth):
@Override public PluginType getType(){
  return PluginType.INTERNAL;
}
Program: 188422
Project: 188422
Buggy source:
/** 
 * Start showing popup
 */
public void start(){
  setPopupPositionAndShow(new PositionCallback(){
    public void setPosition(    int offsetWidth,    int offsetHeight){
      int slotOffset=0;
      for (int i=0; i < slotNumber; i++) {
        if (slots[i] != null) {
          slotOffset+=slots[i].getOffsetHeight() + PADDING;
        }
      }
      Toast.this.setPopupPosition(Window.getClientWidth() - offsetWidth - PADDING,Window.getScrollTop() + PADDING + slotOffset);
    }
  }
);
  hideTimer.schedule(HIDE_DELAY_MS);
}

Fixed version (ground truth):
/** 
 * Start showing popup
 */
public void start(){
  setPopupPositionAndShow(new PositionCallback(){
    public void setPosition(    int offsetWidth,    int offsetHeight){
      int slotOffset=0;
      for (int i=0; i < slotNumber; i++) {
        if (slots[i] != null) {
          slotOffset+=slots[i].getOffsetHeight() + PADDING;
        }
      }
      Window.scrollTo(Window.getScrollLeft(),0);
      Toast.this.setPopupPosition(Window.getClientWidth() - offsetWidth - PADDING,Window.getScrollTop() + PADDING + slotOffset);
    }
  }
);
  hideTimer.schedule(HIDE_DELAY_MS);
}
Program: 188423
Project: 188423
Buggy source:
public void setPosition(int offsetWidth,int offsetHeight){
  int slotOffset=0;
  for (int i=0; i < slotNumber; i++) {
    if (slots[i] != null) {
      slotOffset+=slots[i].getOffsetHeight() + PADDING;
    }
  }
  Toast.this.setPopupPosition(Window.getClientWidth() - offsetWidth - PADDING,Window.getScrollTop() + PADDING + slotOffset);
}

Fixed version (ground truth):
public void setPosition(int offsetWidth,int offsetHeight){
  int slotOffset=0;
  for (int i=0; i < slotNumber; i++) {
    if (slots[i] != null) {
      slotOffset+=slots[i].getOffsetHeight() + PADDING;
    }
  }
  Window.scrollTo(Window.getScrollLeft(),0);
  Toast.this.setPopupPosition(Window.getClientWidth() - offsetWidth - PADDING,Window.getScrollTop() + PADDING + slotOffset);
}
Program: 188424
Project: 188424
Buggy source:
@Test public void siegfriedCorporaTestAIP() throws RODAException, ParseException, FileAlreadyExistsException, InterruptedException, IOException {
  AIP root=model.createAIP(null,RodaConstants.AIP_TYPE_MIXED,new Permissions(),aipCreator);
  TransferredResource transferredResource=createCorpora();
  AssertJUnit.assertEquals(transferredResource == null,false);
  Map<String,String> parameters=new HashMap<>();
  parameters.put(RodaConstants.PLUGIN_PARAMS_PARENT_ID,root.getId());
  parameters.put(RodaConstants.PLUGIN_PARAMS_SIP_TO_AIP_CLASS,TransferredResourceToAIPPlugin.class.getName());
  Job ingest=TestsHelper.executeJob(MinimalIngestPlugin.class,parameters,PluginType.SIP_TO_AIP,SelectedItemsList.create(TransferredResource.class,transferredResource.getUUID()));
  List<Report> ingestReports=TestsHelper.getJobReports(index,ingest,true);
  AssertJUnit.assertEquals(1,ingestReports.size());
  String aipId=ingestReports.get(0).getOutcomeObjectId();
  Job job=TestsHelper.executeJob(SiegfriedPlugin.class,new HashMap<String,String>(),PluginType.MISC,SelectedItemsList.create(AIP.class,aipId));
  List<Report> jobReports=TestsHelper.getJobReports(index,job,true);
  AssertJUnit.assertEquals(1,jobReports.size());
  Report report=jobReports.get(0);
  AssertJUnit.assertEquals(0,report.getReports().size());
  AssertJUnit.assertEquals(false,report.getDateCreated().equals(report.getDateUpdated()));
}

Fixed version (ground truth):
@Test public void siegfriedCorporaTestAIP() throws RODAException, ParseException, FileAlreadyExistsException, InterruptedException, IOException {
  AIP root=model.createAIP(null,RodaConstants.AIP_TYPE_MIXED,new Permissions(),aipCreator);
  TransferredResource transferredResource=createCorpora();
  AssertJUnit.assertEquals(transferredResource == null,false);
  Map<String,String> parameters=new HashMap<>();
  parameters.put(RodaConstants.PLUGIN_PARAMS_PARENT_ID,root.getId());
  parameters.put(RodaConstants.PLUGIN_PARAMS_SIP_TO_AIP_CLASS,TransferredResourceToAIPPlugin.class.getName());
  Job ingest=TestsHelper.executeJob(MinimalIngestPlugin.class,parameters,PluginType.SIP_TO_AIP,SelectedItemsList.create(TransferredResource.class,transferredResource.getUUID()));
  List<Report> ingestReports=TestsHelper.getJobReports(index,ingest,true);
  AssertJUnit.assertEquals(1,ingestReports.size());
  String aipId=ingestReports.get(0).getOutcomeObjectId();
  Job job=TestsHelper.executeJob(SiegfriedPlugin.class,new HashMap<String,String>(),PluginType.MISC,SelectedItemsList.create(AIP.class,aipId));
  List<Report> jobReports=TestsHelper.getJobReports(index,job,true);
  AssertJUnit.assertEquals(1,jobReports.size());
  Report report=jobReports.get(0);
  AssertJUnit.assertEquals(1,report.getReports().size());
  Report innerReport=report.getReports().get(0);
  AssertJUnit.assertEquals(false,report.getDateCreated().equals(report.getDateUpdated()));
  AssertJUnit.assertEquals(true,report.getDateCreated().equals(innerReport.getDateCreated()));
  AssertJUnit.assertEquals(true,report.getDateUpdated().equals(innerReport.getDateUpdated()));
}
Program: 188425
Project: 188425
Buggy source:
@Test private void ingestCorporaTest() throws RequestNotValidException, NotFoundException, GenericException, AlreadyExistsException, AuthorizationDeniedException, InvalidParameterException, InterruptedException, IOException, FileAlreadyExistsException, SolrServerException {
  AIP root=model.createAIP(null,RodaConstants.AIP_TYPE_MIXED,new Permissions(),aipCreator);
  TransferredResource transferredResource=createCorpora();
  AssertJUnit.assertEquals(transferredResource == null,false);
  Map<String,String> parameters=new HashMap<>();
  parameters.put(RodaConstants.PLUGIN_PARAMS_PARENT_ID,root.getId());
  parameters.put(RodaConstants.PLUGIN_PARAMS_SIP_TO_AIP_CLASS,TransferredResourceToAIPPlugin.class.getName());
  Job job=TestsHelper.executeJob(MinimalIngestPlugin.class,parameters,PluginType.SIP_TO_AIP,SelectedItemsList.create(TransferredResource.class,transferredResource.getUUID()));
  List<Report> jobReports=TestsHelper.getJobReports(index,job,true);
  AssertJUnit.assertEquals(1,jobReports.size());
  for (  Report report : jobReports) {
    AssertJUnit.assertEquals(5,report.getReports().size());
    AssertJUnit.assertEquals(false,report.getDateCreated().equals(report.getDateUpdated()));
  }
}

Fixed version (ground truth):
@Test private void ingestCorporaTest() throws RequestNotValidException, NotFoundException, GenericException, AlreadyExistsException, AuthorizationDeniedException, InvalidParameterException, InterruptedException, IOException, FileAlreadyExistsException, SolrServerException {
  AIP root=model.createAIP(null,RodaConstants.AIP_TYPE_MIXED,new Permissions(),aipCreator);
  TransferredResource transferredResource=createCorpora();
  AssertJUnit.assertEquals(transferredResource == null,false);
  Map<String,String> parameters=new HashMap<>();
  parameters.put(RodaConstants.PLUGIN_PARAMS_PARENT_ID,root.getId());
  parameters.put(RodaConstants.PLUGIN_PARAMS_SIP_TO_AIP_CLASS,TransferredResourceToAIPPlugin.class.getName());
  Job job=TestsHelper.executeJob(MinimalIngestPlugin.class,parameters,PluginType.SIP_TO_AIP,SelectedItemsList.create(TransferredResource.class,transferredResource.getUUID()));
  List<Report> jobReports=TestsHelper.getJobReports(index,job,true);
  AssertJUnit.assertEquals(1,jobReports.size());
  for (  Report report : jobReports) {
    AssertJUnit.assertEquals(MinimalIngestPlugin.TOTAL_STEPS,report.getReports().size());
    Report first=report.getReports().get(0);
    Report last=report.getReports().get(MinimalIngestPlugin.TOTAL_STEPS - 1);
    AssertJUnit.assertEquals(false,report.getDateCreated().equals(report.getDateUpdated()));
    AssertJUnit.assertEquals(true,report.getDateCreated().equals(first.getDateCreated()));
    AssertJUnit.assertEquals(true,report.getDateUpdated().equals(last.getDateUpdated()));
  }
}
Program: 188428
Project: 188428
Buggy source:
public static <T extends IsRODAObject>void updatePartialJobReport(Plugin<T> plugin,ModelService model,IndexService index,Report reportItem,boolean replaceLastReportItemIfTheSame,Job cachedJob){
  String jobId=getJobId(plugin);
  boolean retrieved=true;
  try {
    Report jobReport;
    try {
      jobReport=model.retrieveJobReport(jobId,reportItem.getOutcomeObjectId(),true);
    }
 catch (    NotFoundException e) {
      jobReport=initPluginReportItem(plugin,reportItem.getOutcomeObjectId(),reportItem.getSourceObjectId()).setSourceObjectClass(reportItem.getSourceObjectClass()).setOutcomeObjectClass(reportItem.getOutcomeObjectClass());
      jobReport.setId(reportItem.getOutcomeObjectId());
      jobReport.addReport(reportItem);
      retrieved=false;
    }
    if (retrieved) {
      if (!replaceLastReportItemIfTheSame) {
        jobReport.addReport(reportItem);
      }
 else {
        List<Report> reportItems=jobReport.getReports();
        Report report=reportItems.get(reportItems.size() - 1);
        if (report.getPlugin().equalsIgnoreCase(reportItem.getPlugin())) {
          reportItems.remove(reportItems.size() - 1);
          jobReport.setStepsCompleted(jobReport.getStepsCompleted() - 1);
          jobReport.addReport(reportItem);
        }
      }
    }
    model.createOrUpdateJobReport(jobReport,cachedJob);
  }
 catch (  GenericException|RequestNotValidException|AuthorizationDeniedException e) {
    LOGGER.error("String_Node_Str",e);
  }
}

Fixed version (ground truth):
public static <T extends IsRODAObject>void updatePartialJobReport(Plugin<T> plugin,ModelService model,IndexService index,Report reportItem,boolean replaceLastReportItemIfTheSame,Job cachedJob){
  String jobId=getJobId(plugin);
  boolean retrieved=true;
  try {
    Report jobReport;
    try {
      jobReport=model.retrieveJobReport(jobId,reportItem.getOutcomeObjectId(),true);
    }
 catch (    NotFoundException e) {
      jobReport=initPluginReportItem(plugin,reportItem.getOutcomeObjectId(),reportItem.getSourceObjectId()).setSourceObjectClass(reportItem.getSourceObjectClass()).setOutcomeObjectClass(reportItem.getOutcomeObjectClass());
      jobReport.setId(reportItem.getId());
      jobReport.setDateCreated(reportItem.getDateCreated());
      jobReport.addReport(reportItem);
      retrieved=false;
    }
    if (retrieved) {
      if (!replaceLastReportItemIfTheSame) {
        jobReport.addReport(reportItem);
      }
 else {
        List<Report> reportItems=jobReport.getReports();
        Report report=reportItems.get(reportItems.size() - 1);
        if (report.getPlugin().equalsIgnoreCase(reportItem.getPlugin())) {
          reportItems.remove(reportItems.size() - 1);
          jobReport.setStepsCompleted(jobReport.getStepsCompleted() - 1);
          jobReport.addReport(reportItem);
        }
      }
    }
    model.createOrUpdateJobReport(jobReport,cachedJob);
  }
 catch (  GenericException|RequestNotValidException|AuthorizationDeniedException e) {
    LOGGER.error("String_Node_Str",e);
  }
}
Program: 188429
Project: 188429
Buggy source:
@Override public void setTotalSteps(){
  this.totalSteps=5;
}

Fixed version (ground truth):
@Override public void setTotalSteps(){
  this.totalSteps=TOTAL_STEPS;
}
Program: 188430
Project: 188430
Buggy source:
@BeforeMethod public static void setUp() throws IOException, GenericException {
  basePath=TestsHelper.createBaseTempDir(FileStorageServiceTest.class,true);
  storage=new FileStorageService(basePath);
}

Fixed version (ground truth):
@BeforeMethod public static void setUp() throws Exception {
  basePath=TestsHelper.createBaseTempDir(FileStorageServiceTest.class,true);
  storage=new FileStorageService(basePath);
}
Program: 188431
Project: 188431
Buggy source:
@AfterMethod public static void tearDown() throws NotFoundException, GenericException {
  FSUtils.deletePath(basePath);
  FSUtils.deletePath(basePath.getParent().resolve(basePath.getFileName() + FileStorageService.HISTORY_SUFFIX));
}

Fixed version (ground truth):
@AfterMethod public static void tearDown() throws RODAException {
  FSUtils.deletePath(basePath);
  FSUtils.deletePath(basePath.getParent().resolve(basePath.getFileName() + FileStorageService.HISTORY_SUFFIX));
}
Program: 188432
Project: 188432
Buggy source:
private static Permissions getPermissions(SolrDocument doc){
  Permissions permissions=new Permissions();
  Map<PermissionType,Set<String>> userPermissions=new HashMap<>();
  for (  PermissionType type : PermissionType.values()) {
    String key=RodaConstants.INDEX_PERMISSION_USERS_PREFIX + type;
    Set<String> users=new HashSet<>();
    users.addAll(objectToListString(doc.get(key)));
    userPermissions.put(type,users);
  }
  Map<PermissionType,Set<String>> groupPermissions=new HashMap<>();
  for (  PermissionType type : PermissionType.values()) {
    String key=RodaConstants.INDEX_PERMISSION_GROUPS_PREFIX + type;
    Set<String> groups=new HashSet<>();
    groups.addAll(objectToListString(doc.get(key)));
    groupPermissions.put(type,groups);
  }
  permissions.setUsers(userPermissions);
  permissions.setGroups(groupPermissions);
  return permissions;
}

Fixed version (ground truth):
private static Permissions getPermissions(SolrDocument doc){
  Permissions permissions=new Permissions();
  EnumMap<PermissionType,Set<String>> userPermissions=new EnumMap<>(PermissionType.class);
  for (  PermissionType type : PermissionType.values()) {
    String key=RodaConstants.INDEX_PERMISSION_USERS_PREFIX + type;
    Set<String> users=new HashSet<>();
    users.addAll(objectToListString(doc.get(key)));
    userPermissions.put(type,users);
  }
  Map<PermissionType,Set<String>> groupPermissions=new EnumMap<>(PermissionType.class);
  for (  PermissionType type : PermissionType.values()) {
    String key=RodaConstants.INDEX_PERMISSION_GROUPS_PREFIX + type;
    Set<String> groups=new HashSet<>();
    groups.addAll(objectToListString(doc.get(key)));
    groupPermissions.put(type,groups);
  }
  permissions.setUsers(userPermissions);
  permissions.setGroups(groupPermissions);
  return permissions;
}
Program: 188434
Project: 188434
Buggy source:
public File renameFolder(File folder,String newName,boolean replaceExisting,boolean reindexResources) throws AlreadyExistsException, GenericException, NotFoundException, RequestNotValidException, AuthorizationDeniedException {
  Path basePath=RodaCoreFactory.getStoragePath();
  StoragePath fileStoragePath=ModelUtils.getFileStoragePath(folder);
  Path fullPath=basePath.resolve(FSUtils.getStoragePathAsString(fileStoragePath,false));
  if (Files.exists(fullPath)) {
    FSUtils.move(fullPath,fullPath.getParent().resolve(newName),replaceExisting);
    if (reindexResources) {
      notifyAIPUpdated(folder.getAipId());
    }
    return retrieveFile(folder.getAipId(),folder.getRepresentationId(),folder.getPath(),newName);
  }
 else {
    throw new NotFoundException("String_Node_Str");
  }
}

Fixed version (ground truth):
public File renameFolder(File folder,String newName,boolean replaceExisting,boolean reindexResources) throws AlreadyExistsException, GenericException, NotFoundException, RequestNotValidException, AuthorizationDeniedException {
  Path basePath=RodaCoreFactory.getStoragePath();
  StoragePath fileStoragePath=ModelUtils.getFileStoragePath(folder);
  Path fullPath=basePath.resolve(FSUtils.getStoragePathAsString(fileStoragePath,false));
  if (Files.exists(fullPath)) {
    FSUtils.move(fullPath,fullPath.getParent().resolve(newName),replaceExisting);
    if (reindexResources) {
      notifyAipUpdated(folder.getAipId());
    }
    return retrieveFile(folder.getAipId(),folder.getRepresentationId(),folder.getPath(),newName);
  }
 else {
    throw new NotFoundException("String_Node_Str");
  }
}
Program: 188436
Project: 188436
Buggy source:
public synchronized void findOldLogsAndMoveThemToStorage(Path logDirectory,Path currentLogFile) throws RequestNotValidException, AuthorizationDeniedException, NotFoundException {
  try {
    final DirectoryStream<Path> directoryStream=Files.newDirectoryStream(logDirectory);
    for (    Path path : directoryStream) {
      if (!path.equals(currentLogFile)) {
        try {
          StoragePath logPath=ModelUtils.getLogStoragePath(path.getFileName().toString());
          storage.createBinary(logPath,new FSPathContentPayload(path),false);
          Files.delete(path);
        }
 catch (        IOException|GenericException|AlreadyExistsException e) {
          LOGGER.error("String_Node_Str",e);
        }
      }
    }
    directoryStream.close();
  }
 catch (  IOException e) {
    LOGGER.error("String_Node_Str",e);
  }
}

Fixed version (ground truth):
public synchronized void findOldLogsAndMoveThemToStorage(Path logDirectory,Path currentLogFile) throws RequestNotValidException, AuthorizationDeniedException, NotFoundException {
  try (DirectoryStream<Path> directoryStream=Files.newDirectoryStream(logDirectory)){
    for (    Path path : directoryStream) {
      if (!path.equals(currentLogFile)) {
        try {
          StoragePath logPath=ModelUtils.getLogStoragePath(path.getFileName().toString());
          storage.createBinary(logPath,new FSPathContentPayload(path),false);
          Files.delete(path);
        }
 catch (        IOException|GenericException|AlreadyExistsException e) {
          LOGGER.error("String_Node_Str",e);
        }
      }
    }
  }
 catch (  IOException e) {
    LOGGER.error("String_Node_Str",e);
  }
}
Program: 188439
Project: 188439
Buggy source:
private static <T extends IsIndexed>void openReferred(final T object,Filter filter){
  BrowserService.Util.getInstance().find(IndexedDIP.class.getName(),filter,DEFAULT_DIPFILE_SORTER,new Sublist(0,1),Facets.NONE,LocaleInfo.getCurrentLocale().getLocaleName(),true,Arrays.asList(RodaConstants.DIP_ID),new AsyncCallback<IndexResult<IndexedDIP>>(){
    @Override public void onFailure(    Throwable caught){
      AsyncCallbackUtils.defaultFailureTreatment(caught);
    }
    @Override public void onSuccess(    IndexResult<IndexedDIP> result){
      if (result.getTotalCount() > 0) {
        HistoryUtils.openBrowse(result.getResults().get(0));
      }
 else {
        HistoryUtils.resolve(object);
      }
    }
  }
);
}

Fixed version (ground truth):
private static <T extends IsIndexed>void openReferred(final T object,Filter filter){
  BrowserService.Util.getInstance().find(IndexedDIP.class.getName(),filter,DEFAULT_DIPFILE_SORTER,new Sublist(0,1),Facets.NONE,LocaleInfo.getCurrentLocale().getLocaleName(),true,Arrays.asList(RodaConstants.INDEX_UUID,RodaConstants.DIP_ID),new AsyncCallback<IndexResult<IndexedDIP>>(){
    @Override public void onFailure(    Throwable caught){
      AsyncCallbackUtils.defaultFailureTreatment(caught);
    }
    @Override public void onSuccess(    IndexResult<IndexedDIP> result){
      if (result.getTotalCount() > 0) {
        HistoryUtils.openBrowse(result.getResults().get(0));
      }
 else {
        HistoryUtils.resolve(object);
      }
    }
  }
);
}
Program: 188441
Project: 188441
Buggy source:
@Override public Widget createActionsLayout(SelectedItems<IndexedDIP> disseminations,AsyncCallback<ActionImpact> callback){
  FlowPanel layout=createLayout();
  addTitle(layout,messages.viewRepresentationFileDisseminationTitle(),disseminations,null,DisseminationAction.DOWNLOAD,DisseminationAction.REMOVE);
  addButton(layout,messages.downloadButton(),DisseminationAction.DOWNLOAD,disseminations,ActionImpact.NONE,callback,"String_Node_Str");
  addButton(layout,messages.removeButton(),DisseminationAction.REMOVE,disseminations,ActionImpact.DESTROYED,callback,"String_Node_Str");
  addButton(layout,messages.disseminationPermissions(),DisseminationAction.UPDATE_PERMISSIONS,disseminations,ActionImpact.UPDATED,callback,"String_Node_Str");
  addTitle(layout,messages.preservationTitle(),disseminations,null,DisseminationAction.NEW_PROCESS);
  addButton(layout,messages.newProcessPreservation(),DisseminationAction.NEW_PROCESS,disseminations,ActionImpact.UPDATED,callback,"String_Node_Str");
  return layout;
}

Fixed version (ground truth):
@Override public Widget createActionsLayout(SelectedItems<IndexedDIP> disseminations,AsyncCallback<ActionImpact> callback){
  FlowPanel layout=createLayout();
  addTitle(layout,messages.viewRepresentationFileDisseminationTitle(),disseminations,DisseminationAction.DOWNLOAD,DisseminationAction.REMOVE);
  addButton(layout,messages.downloadButton(),DisseminationAction.DOWNLOAD,disseminations,ActionImpact.NONE,callback,"String_Node_Str");
  addButton(layout,messages.removeButton(),DisseminationAction.REMOVE,disseminations,ActionImpact.DESTROYED,callback,"String_Node_Str");
  addButton(layout,messages.disseminationPermissions(),DisseminationAction.UPDATE_PERMISSIONS,disseminations,ActionImpact.UPDATED,callback,"String_Node_Str");
  addTitle(layout,messages.preservationTitle(),disseminations,DisseminationAction.NEW_PROCESS);
  addButton(layout,messages.newProcessPreservation(),DisseminationAction.NEW_PROCESS,disseminations,ActionImpact.UPDATED,callback,"String_Node_Str");
  return layout;
}
Program: 188442
Project: 188442
Buggy source:
public void showEvents(IndexedFile file,final AsyncCallback<ActionImpact> callback){
  List<String> history=new ArrayList<>();
  history.add(file.getAipId());
  history.add(file.getRepresentationUUID());
  history.add(file.getUUID());
  GWT.log(history.toString());
  HistoryUtils.newHistory(PreservationEvents.BROWSE_RESOLVER,history);
  callback.onSuccess(ActionImpact.NONE);
}

Fixed version (ground truth):
public void showEvents(IndexedFile file,final AsyncCallback<ActionImpact> callback){
  List<String> history=new ArrayList<>();
  history.add(file.getAipId());
  history.add(file.getRepresentationUUID());
  history.add(file.getUUID());
  HistoryUtils.newHistory(PreservationEvents.BROWSE_RESOLVER,history);
  callback.onSuccess(ActionImpact.NONE);
}
Program: 188445
Project: 188445
Buggy source:
/** 
 * Constructs a new   {@link PluginParameter} cloning an existing{@link PluginParameter}.
 * @param parameter the  {@link PluginParameter} to clone.
 */
public PluginParameter(PluginParameter parameter){
  this(parameter.getId(),parameter.getName(),parameter.getType(),parameter.getDefaultValue(),parameter.getPossibleValues(),parameter.isMandatory(),parameter.isReadonly(),parameter.getDescription());
}

Fixed version (ground truth):
/** 
 * Constructs a new   {@link PluginParameter} cloning an existing{@link PluginParameter}.
 * @param parameter the  {@link PluginParameter} to clone.
 */
public PluginParameter(PluginParameter parameter){
  this(parameter.getId(),parameter.getName(),parameter.getType(),parameter.getDefaultValue(),new ArrayList<>(parameter.getPossibleValues()),parameter.isMandatory(),parameter.isReadonly(),parameter.getDescription());
}
Program: 188446
Project: 188446
Buggy source:
protected Map<String,PluginParameter> getDefaultParameters(){
  return new HashMap<String,PluginParameter>(pluginParameters);
}

Fixed version (ground truth):
protected Map<String,PluginParameter> getDefaultParameters(){
  return pluginParameters.entrySet().stream().collect(Collectors.toMap(e -> e.getKey(),e -> new PluginParameter(e.getValue())));
}
Program: 188447
Project: 188447
Buggy source:
protected Map<String,PluginParameter> getDefaultParameters(){
  Map<String,PluginParameter> defaultParameters=super.getDefaultParameters();
  defaultParameters.putAll(new HashMap<String,PluginParameter>(pluginParameters));
  return defaultParameters;
}

Fixed version (ground truth):
protected Map<String,PluginParameter> getDefaultParameters(){
  Map<String,PluginParameter> defaultParameters=super.getDefaultParameters();
  defaultParameters.putAll(pluginParameters.entrySet().stream().collect(Collectors.toMap(e -> e.getKey(),e -> new PluginParameter(e.getValue()))));
  return defaultParameters;
}
Program: 188449
Project: 188449
Buggy source:
@Override public void process(IndexService index,ModelService model,StorageService storage,Report report,Job cachedJob,SimpleJobPluginInfo jobPluginInfo,Plugin<TransferredResource> plugin,TransferredResource object){
  processTransferredResource(index,model,report,cachedJob,object);
}

Fixed version (ground truth):
@Override public void process(IndexService index,ModelService model,StorageService storage,Report report,Job cachedJob,SimpleJobPluginInfo jobPluginInfo,Plugin<TransferredResource> plugin,TransferredResource object){
  processTransferredResource(index,model,report,jobPluginInfo,cachedJob,object);
}
Program: 188450
Project: 188450
Buggy source:
@Override public Report execute(IndexService index,ModelService model,StorageService storage,List<LiteOptionalWithCause> liteList) throws PluginException {
  return PluginHelper.processObjects(this,new RODAObjectProcessingLogic<TransferredResource>(){
    @Override public void process(    IndexService index,    ModelService model,    StorageService storage,    Report report,    Job cachedJob,    SimpleJobPluginInfo jobPluginInfo,    Plugin<TransferredResource> plugin,    TransferredResource object){
      processTransferredResource(index,model,report,cachedJob,object);
    }
  }
,index,model,storage,liteList);
}

Fixed version (ground truth):
@Override public Report execute(IndexService index,ModelService model,StorageService storage,List<LiteOptionalWithCause> liteList) throws PluginException {
  return PluginHelper.processObjects(this,new RODAObjectProcessingLogic<TransferredResource>(){
    @Override public void process(    IndexService index,    ModelService model,    StorageService storage,    Report report,    Job cachedJob,    SimpleJobPluginInfo jobPluginInfo,    Plugin<TransferredResource> plugin,    TransferredResource object){
      processTransferredResource(index,model,report,jobPluginInfo,cachedJob,object);
    }
  }
,index,model,storage,liteList);
}
Program: 188451
Project: 188451
Buggy source:
@Override public Report beforeAllExecute(IndexService index,ModelService model,StorageService storage) throws PluginException {
  return null;
}

Fixed version (ground truth):
@Override public Report beforeAllExecute(IndexService index,ModelService model,StorageService storage) throws PluginException {
  createEvent=Boolean.parseBoolean(RodaCoreFactory.getRodaConfigurationAsString("String_Node_Str","String_Node_Str","String_Node_Str"));
  return new Report();
}
Program: 188452
Project: 188452
Buggy source:
private void processTransferredResource(IndexService index,ModelService model,Report report,Job job,TransferredResource transferredResource){
  Report reportItem=PluginHelper.initPluginReportItem(this,transferredResource);
  PluginHelper.updatePartialJobReport(this,model,index,reportItem,false,job);
  try {
    LOGGER.debug("String_Node_Str",transferredResource.getFullPath());
    model.deleteTransferredResource(transferredResource);
    LOGGER.debug("String_Node_Str",transferredResource.getFullPath());
  }
 catch (  RuntimeException e) {
    reportItem.setPluginState(PluginState.FAILURE).setPluginDetails(e.getMessage());
    LOGGER.error("String_Node_Str" + transferredResource.getFullPath(),e);
  }
  report.addReport(reportItem);
  PluginHelper.updatePartialJobReport(this,model,index,reportItem,true,job);
}

Fixed version (ground truth):
private void processTransferredResource(IndexService index,ModelService model,Report report,SimpleJobPluginInfo pluginInfo,Job job,TransferredResource transferredResource){
  Report reportItem=PluginHelper.initPluginReportItem(this,transferredResource);
  PluginHelper.updatePartialJobReport(this,model,index,reportItem,false,job);
  try {
    LOGGER.debug("String_Node_Str",transferredResource.getFullPath());
    model.deleteTransferredResource(transferredResource);
    LOGGER.debug("String_Node_Str",transferredResource.getFullPath());
    if (createEvent) {
      model.createRepositoryEvent(PreservationEventType.DELETION,"String_Node_Str",PluginState.SUCCESS,"String_Node_Str" + transferredResource.getId() + "String_Node_Str","String_Node_Str",job.getUsername(),true);
    }
    pluginInfo.incrementObjectsProcessedWithSuccess();
  }
 catch (  RuntimeException e) {
    if (createEvent) {
      model.createRepositoryEvent(PreservationEventType.DELETION,"String_Node_Str",PluginState.SUCCESS,"String_Node_Str" + transferredResource.getId() + "String_Node_Str","String_Node_Str",job.getUsername(),true);
    }
    pluginInfo.incrementObjectsProcessedWithFailure();
    reportItem.setPluginState(PluginState.FAILURE).setPluginDetails(e.getMessage());
    LOGGER.error("String_Node_Str" + transferredResource.getFullPath(),e);
  }
  report.addReport(reportItem);
  PluginHelper.updatePartialJobReport(this,model,index,reportItem,true,job);
}
Program: 188453
Project: 188453
Buggy source:
@Override public Report afterAllExecute(IndexService index,ModelService model,StorageService storage) throws PluginException {
  return null;
}

Fixed version (ground truth):
@Override public Report afterAllExecute(IndexService index,ModelService model,StorageService storage) throws PluginException {
  return new Report();
}
Program: 188454
Project: 188454
Buggy source:
/** 
 * Assess the risk for the given   {@link FileFormat}.
 * @param fileFormat the  {@link FileFormat}.
 * @return the {@link Result} of the assessment.
 */
private Result assessRiskOnFileFormat(final FileFormat fileFormat){
  final boolean missingFormatName=checkFormatDesignationName() && (StringUtils.isBlank(fileFormat.getFormatDesignationName()));
  final boolean missingFormatVersion=checkFormatDesignationName() && (StringUtils.isBlank(fileFormat.getFormatDesignationName()));
  final boolean missingMimetype=checkMimetype() && StringUtils.isBlank(fileFormat.getMimeType());
  final boolean missingPronom=checkPronom() && StringUtils.isBlank(fileFormat.getPronom());
  return new Result(missingFormatName,missingFormatVersion,missingMimetype,missingPronom);
}

Fixed version (ground truth):
/** 
 * Assess the risk for the given   {@link FileFormat}.
 * @param fileFormat the  {@link FileFormat}.
 * @return the {@link Result} of the assessment.
 */
private Result assessRiskOnFileFormat(final FileFormat fileFormat){
  final boolean missingFormatName=checkFormatDesignationName() && (StringUtils.isBlank(fileFormat.getFormatDesignationName()));
  final boolean missingFormatVersion=checkFormatDesignationVersion() && (StringUtils.isBlank(fileFormat.getFormatDesignationVersion()));
  final boolean missingMimetype=checkMimetype() && StringUtils.isBlank(fileFormat.getMimeType());
  final boolean missingPronom=checkPronom() && StringUtils.isBlank(fileFormat.getPronom());
  return new Result(missingFormatName,missingFormatVersion,missingMimetype,missingPronom);
}
Program: 188455
Project: 188455
Buggy source:
@Override @SuppressWarnings("String_Node_Str") public void init(final FilterConfig filterConfig) throws ServletException {
  this.webXmlFilterConfig=filterConfig;
  if (isConfigAvailable()) {
    initInnerFilter();
  }
}

Fixed version (ground truth):
@Override @SuppressWarnings("String_Node_Str") public void init(final FilterConfig filterConfig) throws ServletException {
  this.webXmlFilterConfig=filterConfig;
}