nus-yam/ex-repair huggingface dataset:
Program: 96111
Project: 96111
Buggy source:
/** 
 * Sets -javaagent and JRE arguments as SUN environment variable.
 * @param parameters The parameters for starting the AUT
 * @return the _JAVA_OPTIONS environment variable including -javaagentand jre arguments
 */
protected String setJavaOptions(Map parameters){
  StringBuffer sb=new StringBuffer();
  if (isRunningFromExecutable(parameters)) {
    Locale locale=(Locale)parameters.get(IStartAut.LOCALE);
    sb.append(JAVA_OPTIONS_INTRO);
    if (isRunningWithMonitoring(parameters)) {
      sb.append(getMonitoringAgent(parameters)).append(StringConstants.SPACE);
    }
    sb.append(StringConstants.QUOTE).append("String_Node_Str").append(getAbsoluteAgentJarPath()).append(StringConstants.QUOTE);
    if (locale != null) {
      sb.append(StringConstants.SPACE).append(JAVA_COUNTRY_PROPERTY).append(locale.getCountry());
      sb.append(StringConstants.SPACE).append(JAVA_LANGUAGE_PROPERTY).append(locale.getLanguage());
    }
  }
 else {
    if (isRunningWithMonitoring(parameters)) {
      sb.append(JAVA_OPTIONS_INTRO).append(getMonitoringAgent(parameters));
    }
  }
  return sb.toString();
}

Fixed version (ground truth):
/** 
 * Sets -javaagent and JRE arguments as SUN environment variable.
 * @param parameters The parameters for starting the AUT
 * @return the _JAVA_OPTIONS environment variable including -javaagentand jre arguments
 */
protected String setJavaOptions(Map parameters){
  StringBuffer sb=new StringBuffer();
  if (isRunningFromExecutable(parameters)) {
    Locale locale=(Locale)parameters.get(IStartAut.LOCALE);
    sb.append(JAVA_OPTIONS_INTRO);
    if (shouldAndCanRunWithMonitoring(parameters)) {
      sb.append(getMonitoringAgent(parameters)).append(StringConstants.SPACE);
    }
    sb.append(StringConstants.QUOTE).append("String_Node_Str").append(getAbsoluteAgentJarPath()).append(StringConstants.QUOTE);
    if (locale != null) {
      sb.append(StringConstants.SPACE).append(JAVA_COUNTRY_PROPERTY).append(locale.getCountry());
      sb.append(StringConstants.SPACE).append(JAVA_LANGUAGE_PROPERTY).append(locale.getLanguage());
    }
  }
 else {
    if (shouldAndCanRunWithMonitoring(parameters)) {
      sb.append(JAVA_OPTIONS_INTRO).append(getMonitoringAgent(parameters));
    }
  }
  return sb.toString();
}
Program: 96112
Project: 96112
Buggy source:
/** 
 * {@inheritDoc}
 */
protected String[] createEnvArray(Map parameters,boolean isAgentSet){
  String[] envArray=super.createEnvArray(parameters,isAgentSet);
  if (envArray == null) {
    envArray=EnvironmentUtils.propToStrArray(EnvironmentUtils.getProcessEnvironment(),IStartAut.PROPERTY_DELIMITER);
  }
  Vector<String> envList=new Vector<String>(Arrays.asList(envArray));
  envList.addAll(getConnectionProperties(parameters,StartSwtAutServerCommand.ENV_VAR_PREFIX,StartSwtAutServerCommand.ENV_VALUE_SEP));
  if (isRunningWithMonitoring(parameters)) {
    StringBuffer sb=new StringBuffer();
    sb.append(JAVA_OPTIONS_INTRO);
    sb.append(this.getMonitoringAgent(parameters));
    envList.add(sb.toString());
    envArray=super.createEnvArray(parameters,true);
  }
  envArray=envList.toArray(new String[envList.size()]);
  return envArray;
}

Fixed version (ground truth):
/** 
 * {@inheritDoc}
 */
protected String[] createEnvArray(Map parameters,boolean isAgentSet){
  String[] envArray=super.createEnvArray(parameters,isAgentSet);
  if (envArray == null) {
    envArray=EnvironmentUtils.propToStrArray(EnvironmentUtils.getProcessEnvironment(),IStartAut.PROPERTY_DELIMITER);
  }
  Vector<String> envList=new Vector<String>(Arrays.asList(envArray));
  envList.addAll(getConnectionProperties(parameters,StartSwtAutServerCommand.ENV_VAR_PREFIX,StartSwtAutServerCommand.ENV_VALUE_SEP));
  if (shouldAndCanRunWithMonitoring(parameters)) {
    StringBuffer sb=new StringBuffer();
    sb.append(JAVA_OPTIONS_INTRO);
    sb.append(this.getMonitoringAgent(parameters));
    envList.add(sb.toString());
    envArray=super.createEnvArray(parameters,true);
  }
  envArray=envList.toArray(new String[envList.size()]);
  return envArray;
}
Program: 96113
Project: 96113
Buggy source:
/** 
 * {@inheritDoc}
 */
protected String[] createEnvArray(Map parameters,boolean isAgentSet){
  if (isRunningFromExecutable(parameters) || isRunningWithMonitoring(parameters)) {
    setEnv(parameters);
    boolean agentActive=true;
    return super.createEnvArray(parameters,agentActive);
  }
  return super.createEnvArray(parameters,isAgentSet);
}

Fixed version (ground truth):
/** 
 * {@inheritDoc}
 */
protected String[] createEnvArray(Map parameters,boolean isAgentSet){
  if (isRunningFromExecutable(parameters) || shouldAndCanRunWithMonitoring(parameters)) {
    setEnv(parameters);
    boolean agentActive=true;
    return super.createEnvArray(parameters,agentActive);
  }
  return super.createEnvArray(parameters,isAgentSet);
}
Program: 96114
Project: 96114
Buggy source:
/** 
 * Checks, if an execTC has compNames without compTypes
 */
@SuppressWarnings("String_Node_Str") private void checkCompNamesPairs(){
  IProjectPO project=GeneralStorage.getInstance().getProject();
  if (project == null) {
    return;
  }
  final ITreeNodeOperation<INodePO> op=new CheckProblemsOperation();
  TreeTraverser traverser=new TreeTraverser(project,op,true,true);
  traverser.addOperation(new ActionCheckOperation());
  traverser.traverse();
}

Fixed version (ground truth):
/** 
 * Checks, if an execTC has compNames without compTypes
 */
@SuppressWarnings("String_Node_Str") private void checkCompNamesPairs(){
  IProjectPO project=GeneralStorage.getInstance().getProject();
  if (project == null) {
    return;
  }
  final ITreeNodeOperation<INodePO> op=new CheckProblemsOperation();
  TreeTraverser traverser=new TreeTraverser(project,op,false,true);
  CheckForDeprecatedModulesOperation operation=new CheckForDeprecatedModulesOperation();
  traverser.addOperation(operation);
  traverser.traverse();
  TreeTraverser specTreeTraverser=new SpecTreeTraverser(project,op);
  specTreeTraverser.addOperation(operation);
  specTreeTraverser.traverse();
}
Program: 96116
Project: 96116
Buggy source:
/** 
 * wait for the CLC service to receive a shutdown from the client
 */
private void doClcService() throws ToolkitPluginException {
  IProjectPO project=m_job.getProject();
  String autConfigName=m_job.getAutConfigName();
  ITestSuitePO workUnit=null;
  IAUTConfigPO autConfig=null;
  for (  ITestSuitePO ts : TestSuiteBP.getListOfTestSuites(project)) {
    for (    IAUTConfigPO cfg : ts.getAut().getAutConfigSet()) {
      if (autConfigName.equals(cfg.getName())) {
        workUnit=ts;
        autConfig=cfg;
        break;
      }
    }
  }
  if (workUnit != null && autConfig != null) {
    ensureAutIsStarted(workUnit,autConfig);
  }
  m_clientActive=true;
  do {
synchronized (m_rmiBase) {
      try {
        m_rmiBase.wait();
      }
 catch (      InterruptedException e) {
      }
    }
  }
 while (m_clientActive);
  if (autConfig != null) {
    try {
      AutIdentifier startedAutId=new AutIdentifier(autConfig.getConfigMap().get(AutConfigConstants.AUT_ID));
      if (ServerConnection.getInstance().isConnected()) {
        ClientTestFactory.getClientTest().stopAut(startedAutId);
      }
    }
 catch (    ConnectionException e) {
      LOG.info(Messages.ErrorWhileStoppingAUT,e);
    }
  }
}

Fixed version (ground truth):
/** 
 * wait for the CLC service to receive a shutdown from the client
 */
private void doClcService() throws ToolkitPluginException {
  IProjectPO project=m_job.getProject();
  String autConfigName=m_job.getAutConfigName();
  ITestSuitePO workUnit=null;
  IAUTConfigPO autConfig=null;
  for (  ITestSuitePO ts : TestSuiteBP.getListOfTestSuites(project)) {
    for (    IAUTConfigPO cfg : ts.getAut().getAutConfigSet()) {
      if (autConfigName.equals(cfg.getName())) {
        workUnit=ts;
        autConfig=cfg;
        break;
      }
    }
  }
  if (workUnit != null && autConfig != null) {
    ensureAutIsStarted(workUnit,autConfig);
  }
  m_clientActive=true;
  do {
synchronized (m_rmiBase) {
      try {
        m_rmiBase.wait();
      }
 catch (      InterruptedException e) {
      }
    }
  }
 while (m_clientActive);
  if (autConfig != null) {
    try {
      AutIdentifier startedAutId=new AutIdentifier(autConfig.getConfigMap().get(AutConfigConstants.AUT_ID));
      if (AutAgentConnection.getInstance().isConnected()) {
        ClientTestFactory.getClientTest().stopAut(startedAutId);
      }
    }
 catch (    ConnectionException e) {
      LOG.info(Messages.ErrorWhileStoppingAUT,e);
    }
  }
}
Program: 96117
Project: 96117
Buggy source:
/** 
 * private constructor 
 */
private ExecutionController(){
  IClientTest clientTest=ClientTestFactory.getClientTest();
  clientTest.addAUTServerEventListener(this);
  clientTest.addAutStarterEventListener(this);
  clientTest.addTestEventListener(this);
  clientTest.addTestExecutionEventListener(this);
  AutAgentRegistration.getInstance().addListener(this);
}

Fixed version (ground truth):
/** 
 * private constructor 
 */
private ExecutionController(){
  IClientTest clientTest=ClientTestFactory.getClientTest();
  clientTest.addAUTServerEventListener(this);
  clientTest.addAutAgentEventListener(this);
  clientTest.addTestEventListener(this);
  clientTest.addTestExecutionEventListener(this);
  AutAgentRegistration.getInstance().addListener(this);
}
Program: 96119
Project: 96119
Buggy source:
/** 
 * @param aut AUT where the object mapping is incomplete
 * @return A problem which represents incomplete object mapping of thisAUT.
 */
public static IProblem createIncompleteObjectMappingProblem(IAUTMainPO aut){
  return new Problem(NLS.bind(Messages.ProblemIncompleteObjectMappingMarkerText,aut.getName()),new Status(IStatus.ERROR,Activator.PLUGIN_ID,Messages.ProblemIncompleteObjectMappingTooltip),aut.getName(),ProblemType.REASON_OM_INCOMPLETE);
}

Fixed version (ground truth):
/** 
 * @param aut AUT where the object mapping is incomplete
 * @return A problem which represents incomplete object mapping of thisAUT.
 */
public static IProblem createIncompleteObjectMappingProblem(IAUTMainPO aut){
  String autName=aut.getName();
  return new Problem(NLS.bind(Messages.ProblemIncompleteObjectMappingMarkerText,autName),new Status(IStatus.ERROR,Activator.PLUGIN_ID,NLS.bind(Messages.ProblemIncompleteObjectMappingTooltip,autName)),autName,ProblemType.REASON_OM_INCOMPLETE);
}
Program: 96120
Project: 96120
Buggy source:
public void run(){
  Image img=provider.getImage(m_scrollComposite.getDisplay());
  m_image.setImage(img);
  if (img != null) {
    m_image.setSize(img.getBounds().width,img.getBounds().height);
  }
  m_scrollComposite.setMinSize(m_child.computeSize(SWT.DEFAULT,SWT.DEFAULT));
}

Fixed version (ground truth):
public void run(){
  clearImage();
  m_img=provider.getImage(m_scrollComposite.getDisplay());
  m_imgWidget.setImage(m_img);
  if (m_img != null) {
    m_imgWidget.setSize(m_img.getBounds().width,m_img.getBounds().height);
  }
  m_scrollComposite.setMinSize(m_child.computeSize(SWT.DEFAULT,SWT.DEFAULT));
}
Program: 96121
Project: 96121
Buggy source:
/** 
 * {@inheritDoc}
 */
public void setFocus(){
  m_image.setFocus();
}

Fixed version (ground truth):
/** 
 * {@inheritDoc}
 */
public void setFocus(){
  m_imgWidget.setFocus();
}
Program: 96122
Project: 96122
Buggy source:
/** 
 * {@inheritDoc}
 */
public void dispose(){
  getSelectionService().removeSelectionListener(m_selectionListener);
  super.dispose();
}

Fixed version (ground truth):
/** 
 * {@inheritDoc}
 */
public void dispose(){
  getSelectionService().removeSelectionListener(m_selectionListener);
  if (!m_img.isDisposed()) {
    m_img.dispose();
  }
  super.dispose();
}
Program: 96123
Project: 96123
Buggy source:
/** 
 * {@inheritDoc}
 */
public void createPartControl(Composite parent){
  parent.setLayout(new FillLayout());
  m_scrollComposite=new ScrolledComposite(parent,SWT.V_SCROLL | SWT.H_SCROLL);
  m_child=new Composite(m_scrollComposite,SWT.NONE);
  m_child.setLayout(new FillLayout());
  m_image=new Label(m_child,SWT.NONE);
  m_scrollComposite.setExpandHorizontal(true);
  m_scrollComposite.setExpandVertical(true);
  m_scrollComposite.setMinSize(m_child.computeSize(SWT.DEFAULT,SWT.DEFAULT));
  m_scrollComposite.setContent(m_child);
  getSelectionService().addSelectionListener(m_selectionListener);
  handleSelection(getSelectionService().getSelection());
  getSite().setSelectionProvider(this);
}

Fixed version (ground truth):
/** 
 * {@inheritDoc}
 */
public void createPartControl(Composite parent){
  parent.setLayout(new FillLayout());
  m_scrollComposite=new ScrolledComposite(parent,SWT.V_SCROLL | SWT.H_SCROLL);
  m_child=new Composite(m_scrollComposite,SWT.NONE);
  m_child.setLayout(new FillLayout());
  m_imgWidget=new Label(m_child,SWT.NONE);
  m_scrollComposite.setExpandHorizontal(true);
  m_scrollComposite.setExpandVertical(true);
  m_scrollComposite.setMinSize(m_child.computeSize(SWT.DEFAULT,SWT.DEFAULT));
  m_scrollComposite.setContent(m_child);
  getSelectionService().addSelectionListener(m_selectionListener);
  handleSelection(getSelectionService().getSelection());
  getSite().setSelectionProvider(this);
}
Program: 96124
Project: 96124
Buggy source:
/** 
 * @param provider the provider
 */
protected void setImage(final ImageProvider provider){
  m_scrollComposite.getDisplay().syncExec(new Runnable(){
    public void run(){
      Image img=provider.getImage(m_scrollComposite.getDisplay());
      m_image.setImage(img);
      if (img != null) {
        m_image.setSize(img.getBounds().width,img.getBounds().height);
      }
      m_scrollComposite.setMinSize(m_child.computeSize(SWT.DEFAULT,SWT.DEFAULT));
    }
  }
);
}

Fixed version (ground truth):
/** 
 * @param provider the provider
 */
protected void setImage(final ImageProvider provider){
  m_scrollComposite.getDisplay().syncExec(new Runnable(){
    public void run(){
      clearImage();
      m_img=provider.getImage(m_scrollComposite.getDisplay());
      m_imgWidget.setImage(m_img);
      if (m_img != null) {
        m_imgWidget.setSize(m_img.getBounds().width,m_img.getBounds().height);
      }
      m_scrollComposite.setMinSize(m_child.computeSize(SWT.DEFAULT,SWT.DEFAULT));
    }
  }
);
}
Program: 96125
Project: 96125
Buggy source:
/** 
 * inserts a new Technical Name into GUIModel
 * @param component IComponentIdentifier
 */
private void createNewTechnicalName(final IComponentIdentifier component){
  if (getEditorHelper().requestEditableState() != EditableState.OK) {
    return;
  }
  IObjectMappingAssoziationPO techNameAssoc=getAut().getObjMap().addTechnicalName(component,getAut());
  if (techNameAssoc != null) {
    getEditorHelper().setDirty(true);
    if (m_omEditorBP.getCategoryToCreateIn() != null) {
      m_omEditorBP.getCategoryToCreateIn().addAssociation(techNameAssoc);
    }
 else {
      getAut().getObjMap().getUnmappedTechnicalCategory().addAssociation(techNameAssoc);
    }
    DataEventDispatcher.getInstance().fireDataChangedListener(techNameAssoc.getCategory(),DataState.StructureModified,UpdateState.onlyInEditor);
    m_tableViewer.refresh();
  }
  if (techNameAssoc == null) {
    for (    IObjectMappingAssoziationPO assoc : getAut().getObjMap().getMappings()) {
      IComponentIdentifier techName=assoc.getTechnicalName();
      if (techName != null && techName.equals(component)) {
        techNameAssoc=assoc;
        techNameAssoc.setCompIdentifier(component);
        break;
      }
    }
  }
  if (techNameAssoc != null) {
    IStructuredSelection techNameSelection=new StructuredSelection(techNameAssoc);
    m_treeViewer.setSelection(techNameSelection);
    m_uiElementTreeViewer.setSelection(techNameSelection);
    m_mappedComponentTreeViewer.setSelection(techNameSelection);
    refreshAllViewer();
  }
}

Fixed version (ground truth):
/** 
 * inserts a new Technical Name into GUIModel
 * @param component IComponentIdentifier
 */
private void createNewTechnicalName(final IComponentIdentifier component){
  if (getEditorHelper().requestEditableState() != EditableState.OK) {
    return;
  }
  IObjectMappingAssoziationPO techNameAssoc=getAut().getObjMap().addTechnicalName(component,getAut());
  if (techNameAssoc != null) {
    getEditorHelper().setDirty(true);
    if (m_omEditorBP.getCategoryToCreateIn() != null) {
      m_omEditorBP.getCategoryToCreateIn().addAssociation(techNameAssoc);
    }
 else {
      getAut().getObjMap().getUnmappedTechnicalCategory().addAssociation(techNameAssoc);
    }
    DataEventDispatcher.getInstance().fireDataChangedListener(techNameAssoc.getCategory(),DataState.StructureModified,UpdateState.onlyInEditor);
    m_tableViewer.refresh();
  }
 else {
    for (    IObjectMappingAssoziationPO assoc : getAut().getObjMap().getMappings()) {
      IComponentIdentifier techName=assoc.getTechnicalName();
      if (techName != null && techName.equals(component)) {
        techNameAssoc=assoc;
        techNameAssoc.setCompIdentifier(component);
        break;
      }
    }
  }
  if (techNameAssoc != null) {
    IStructuredSelection techNameSelection=new StructuredSelection(techNameAssoc);
    m_treeViewer.setSelection(techNameSelection);
    m_uiElementTreeViewer.setSelection(techNameSelection);
    m_mappedComponentTreeViewer.setSelection(techNameSelection);
    refreshAllViewer();
  }
}
Program: 96126
Project: 96126
Buggy source:
/** 
 * {@inheritDoc}
 */
public int hashCode(){
  return new HashCodeBuilder().append(getHierarchyNames()).append(getNeighbours()).toHashCode();
}

Fixed version (ground truth):
/** 
 * {@inheritDoc}
 */
public int hashCode(){
  List neighbours=new ArrayList(getNeighbours());
  Collections.sort(neighbours);
  return new HashCodeBuilder().append(getHierarchyNames()).append(neighbours).toHashCode();
}
Program: 96127
Project: 96127
Buggy source:
/** 
 * {@inheritDoc}
 */
public boolean equals(Object obj){
  if (obj instanceof IComponentIdentifier) {
    IComponentIdentifier compId=(IComponentIdentifier)obj;
    return new EqualsBuilder().append(getHierarchyNames(),compId.getHierarchyNames()).append(getNeighbours(),compId.getNeighbours()).isEquals();
  }
  return super.equals(obj);
}

Fixed version (ground truth):
/** 
 * {@inheritDoc}
 */
public boolean equals(Object obj){
  if (obj instanceof IComponentIdentifier) {
    IComponentIdentifier compId=(IComponentIdentifier)obj;
    List neighbours1=new ArrayList(getNeighbours());
    List neighbours2=new ArrayList(compId.getNeighbours());
    Collections.sort(neighbours1);
    Collections.sort(neighbours2);
    return new EqualsBuilder().append(getHierarchyNames(),compId.getHierarchyNames()).append(neighbours1,neighbours2).isEquals();
  }
  return super.equals(obj);
}
Program: 96128
Project: 96128
Buggy source:
/** 
 * @param arguments
 * @param numParamsExpected
 * @throws InvalidDataException
 */
protected void validateParamCount(String[] arguments,int numParamsExpected) throws InvalidDataException {
  if (arguments.length != 2) {
    throw new InvalidDataException("String_Node_Str" + numParamsExpected + "String_Node_Str"+ arguments.length,MessageIDs.E_WRONG_NUM_FUNCTION_ARGS);
  }
}

Fixed version (ground truth):
/** 
 * @param arguments evaluate() parameter
 * @param numParamsExpected how many parameters does the Evaluator expect
 * @throws InvalidDataException if the are not exactly numParamsExpectedparameters in arguments
 */
protected void validateParamCount(String[] arguments,int numParamsExpected) throws InvalidDataException {
  if (arguments.length != 2) {
    throw new InvalidDataException("String_Node_Str" + numParamsExpected + "String_Node_Str"+ arguments.length,MessageIDs.E_WRONG_NUM_FUNCTION_ARGS);
  }
}
Program: 96129
Project: 96129
Buggy source:
public String evaluate(String[] arguments) throws InvalidDataException {
  validateParamCount(arguments,2);
  try {
    Long dateTime=Long.valueOf(arguments[0]);
    if (dateTime < 0) {
      throw new InvalidDataException("String_Node_Str" + dateTime,MessageIDs.E_TOO_SMALL_VALUE);
    }
    Date date=new Date(dateTime);
    return DateFormatUtils.format(date,arguments[1]);
  }
 catch (  NumberFormatException e) {
    throw new InvalidDataException("String_Node_Str" + arguments[0],MessageIDs.E_BAD_INT);
  }
}

Fixed version (ground truth):
/** 
 * {@inheritDoc}
 */
public String evaluate(String[] arguments) throws InvalidDataException {
  validateParamCount(arguments,2);
  try {
    Long dateTime=Long.valueOf(arguments[0]);
    if (dateTime < 0) {
      throw new InvalidDataException("String_Node_Str" + dateTime,MessageIDs.E_TOO_SMALL_VALUE);
    }
    Date date=new Date(dateTime);
    return DateFormatUtils.format(date,arguments[1]);
  }
 catch (  NumberFormatException e) {
    throw new InvalidDataException("String_Node_Str" + arguments[0],MessageIDs.E_BAD_INT);
  }
}
Program: 96131
Project: 96131
Buggy source:
public String evaluate(String[] arguments) throws InvalidDataException {
  Date now=new Date();
  return String.valueOf(now.getTime());
}

Fixed version (ground truth):
/** 
 * {@inheritDoc}
 */
public String evaluate(String[] arguments){
  Date now=new Date();
  return String.valueOf(now.getTime());
}
Program: 96132
Project: 96132
Buggy source:
public String evaluate(String[] arguments) throws InvalidDataException {
  validateParamCount(arguments,2);
  try {
    Date result=DateUtils.parseDate(arguments[0],new String[]{arguments[1]});
    return String.valueOf(result.getTime());
  }
 catch (  ParseException e) {
    throw new InvalidDataException("String_Node_Str" + e.getMessage(),MessageIDs.E_WRONG_PARAMETER_VALUE);
  }
}

Fixed version (ground truth):
/** 
 * {@inheritDoc}
 */
public String evaluate(String[] arguments) throws InvalidDataException {
  validateParamCount(arguments,2);
  try {
    Date result=DateUtils.parseDate(arguments[0],new String[]{arguments[1]});
    return String.valueOf(result.getTime());
  }
 catch (  ParseException e) {
    throw new InvalidDataException("String_Node_Str" + e.getMessage(),MessageIDs.E_WRONG_PARAMETER_VALUE);
  }
}
Program: 96133
Project: 96133
Buggy source:
/** 
 * inserts a new Technical Name into GUIModel
 * @param component IComponentIdentifier
 */
private void createNewTechnicalName(final IComponentIdentifier component){
  if (getEditorHelper().requestEditableState() != EditableState.OK) {
    return;
  }
  IObjectMappingAssoziationPO techNameAssoc=getAut().getObjMap().addTechnicalName(component,getAut());
  if (techNameAssoc != null) {
    getEditorHelper().setDirty(true);
    if (m_omEditorBP.getCategoryToCreateIn() != null) {
      m_omEditorBP.getCategoryToCreateIn().addAssociation(techNameAssoc);
    }
 else {
      getAut().getObjMap().getUnmappedTechnicalCategory().addAssociation(techNameAssoc);
    }
    DataEventDispatcher.getInstance().fireDataChangedListener(techNameAssoc.getCategory(),DataState.StructureModified,UpdateState.onlyInEditor);
    m_tableViewer.refresh();
  }
  if (techNameAssoc == null) {
    for (    IObjectMappingAssoziationPO assoc : getAut().getObjMap().getMappings()) {
      IComponentIdentifier techName=assoc.getTechnicalName();
      if (techName != null && techName.equals(component)) {
        techNameAssoc=assoc;
        techNameAssoc.setCompIdentifier(component);
        break;
      }
    }
  }
  if (techNameAssoc != null) {
    IStructuredSelection techNameSelection=new StructuredSelection(techNameAssoc);
    m_treeViewer.setSelection(techNameSelection);
    m_uiElementTreeViewer.setSelection(techNameSelection);
    m_mappedComponentTreeViewer.setSelection(techNameSelection);
    refreshAllViewer();
  }
}

Fixed version (ground truth):
/** 
 * inserts a new Technical Name into GUIModel
 * @param component IComponentIdentifier
 */
private void createNewTechnicalName(final IComponentIdentifier component){
  if (getEditorHelper().requestEditableState() != EditableState.OK) {
    return;
  }
  IObjectMappingAssoziationPO techNameAssoc=getAut().getObjMap().addTechnicalName(component,getAut());
  if (techNameAssoc != null) {
    getEditorHelper().setDirty(true);
    if (m_omEditorBP.getCategoryToCreateIn() != null) {
      m_omEditorBP.getCategoryToCreateIn().addAssociation(techNameAssoc);
    }
 else {
      getAut().getObjMap().getUnmappedTechnicalCategory().addAssociation(techNameAssoc);
    }
    DataEventDispatcher.getInstance().fireDataChangedListener(techNameAssoc.getCategory(),DataState.StructureModified,UpdateState.onlyInEditor);
    m_tableViewer.refresh();
  }
 else {
    for (    IObjectMappingAssoziationPO assoc : getAut().getObjMap().getMappings()) {
      IComponentIdentifier techName=assoc.getTechnicalName();
      if (techName != null && techName.equals(component)) {
        techNameAssoc=assoc;
        techNameAssoc.setCompIdentifier(component);
        break;
      }
    }
  }
  if (techNameAssoc != null) {
    IStructuredSelection techNameSelection=new StructuredSelection(techNameAssoc);
    m_treeViewer.setSelection(techNameSelection);
    m_uiElementTreeViewer.setSelection(techNameSelection);
    m_mappedComponentTreeViewer.setSelection(techNameSelection);
    refreshAllViewer();
  }
}
Program: 96134
Project: 96134
Buggy source:
/** 
 * {@inheritDoc}
 */
public int hashCode(){
  return new HashCodeBuilder().append(getHierarchyNames()).append(getNeighbours()).toHashCode();
}

Fixed version (ground truth):
/** 
 * {@inheritDoc}
 */
public int hashCode(){
  List neighbours=new ArrayList(getNeighbours());
  Collections.sort(neighbours);
  return new HashCodeBuilder().append(getHierarchyNames()).append(neighbours).toHashCode();
}
Program: 96135
Project: 96135
Buggy source:
/** 
 * {@inheritDoc}
 */
public boolean equals(Object obj){
  if (obj instanceof IComponentIdentifier) {
    IComponentIdentifier compId=(IComponentIdentifier)obj;
    return new EqualsBuilder().append(getHierarchyNames(),compId.getHierarchyNames()).append(getNeighbours(),compId.getNeighbours()).isEquals();
  }
  return super.equals(obj);
}

Fixed version (ground truth):
/** 
 * {@inheritDoc}
 */
public boolean equals(Object obj){
  if (obj instanceof IComponentIdentifier) {
    IComponentIdentifier compId=(IComponentIdentifier)obj;
    List neighbours1=new ArrayList(getNeighbours());
    List neighbours2=new ArrayList(compId.getNeighbours());
    Collections.sort(neighbours1);
    Collections.sort(neighbours2);
    return new EqualsBuilder().append(getHierarchyNames(),compId.getHierarchyNames()).append(neighbours1,neighbours2).isEquals();
  }
  return super.equals(obj);
}
Program: 96136
Project: 96136
Buggy source:
/** 
 * {@inheritDoc}
 */
protected DropTargetListener getViewerDropAdapter(){
  return new TCEditorDropTargetListener(this);
}

Fixed version (ground truth):
/** 
 * {@inheritDoc} 
 */
protected DropTargetListener getViewerDropAdapter(){
  return new TCEditorDropTargetListener(this);
}
Program: 96138
Project: 96138
Buggy source:
/** 
 * clear all test data related problems for the given node
 * @param node the node
 */
private static void resetTestDataCompleteness(INodePO node){
  IProjectPO proj=GeneralStorage.getInstance().getProject();
  for (  Locale locale : proj.getLangHelper().getLanguageList()) {
    setCompletenessTestData(node,locale,true);
  }
}

Fixed version (ground truth):
/** 
 * clear all test data related problems for the given node
 * @param node the node
 */
private static void resetTestDataCompleteness(INodePO node){
  Set<IProblem> toRemove=new HashSet<IProblem>();
  for (  IProblem problem : node.getProblems()) {
    if (problem.getProblemType().equals(ProblemType.REASON_TD_INCOMPLETE)) {
      toRemove.add(problem);
    }
  }
  for (  IProblem problem : toRemove) {
    node.removeProblem(problem);
  }
}
Program: 96139
Project: 96139
Buggy source:
/** 
 * {@inheritDoc}
 */
public Object executeImpl(ExecutionEvent event){
  TestCaseBrowser testSpecTreeView=(TestCaseBrowser)Plugin.getView(Constants.TC_BROWSER_ID);
  if (testSpecTreeView == null) {
    return null;
  }
  if (!(testSpecTreeView.getTreeViewer().getSelection() instanceof IStructuredSelection)) {
    return null;
  }
  IStructuredSelection selection=(IStructuredSelection)testSpecTreeView.getTreeViewer().getSelection();
  Iterator iter=selection.iterator();
  while (iter.hasNext()) {
    INodePO selectedNode=(INodePO)iter.next();
    INodePO editableNode=findEditableNode(selectedNode);
    if (editableNode == null) {
      return null;
    }
    openEditor(editableNode);
  }
  return null;
}

Fixed version (ground truth):
/** 
 * {@inheritDoc}
 */
public Object executeImpl(ExecutionEvent event){
  TestCaseBrowser testSpecTreeView=(TestCaseBrowser)Plugin.getView(Constants.TC_BROWSER_ID);
  if (testSpecTreeView == null) {
    return null;
  }
  if (!(testSpecTreeView.getTreeViewer().getSelection() instanceof IStructuredSelection)) {
    return null;
  }
  IStructuredSelection selection=(IStructuredSelection)testSpecTreeView.getTreeViewer().getSelection();
  Iterator iter=selection.iterator();
  while (iter.hasNext()) {
    Object obj=iter.next();
    if (obj instanceof INodePO) {
      INodePO selectedNode=(INodePO)obj;
      INodePO editableNode=findEditableNode(selectedNode);
      if (editableNode == null) {
        return null;
      }
      openEditor(editableNode);
    }
  }
  return null;
}
Program: 96140
Project: 96140
Buggy source:
@Override public void caseAFunction(AFunction function){
  if (function.getFunctionName() == null || StringUtils.isEmpty(function.getFunctionName().getText())) {
    throw new SemanticParsingException(I18n.getString(MessageIDs.getMessage(MessageIDs.E_MISSING_FUNCTION_NAME)),MessageIDs.E_MISSING_FUNCTION_NAME,function.getFunctionToken().getPos());
  }
  ParsedParameter argumentParser=new ParsedParameter(m_isGuiSource,m_paramNode,m_paramDesc);
  PFunctionArgList functionArgList=function.getFunctionArgList();
  if (functionArgList != null) {
    functionArgList.apply(argumentParser);
  }
  IParamValueToken[] argumentTokens=argumentParser.getTokens().toArray(new IParamValueToken[argumentParser.getTokens().size()]);
  StringBuilder functionTextBuilder=new StringBuilder();
  functionTextBuilder.append(function.getFunctionToken().getText()).append(function.getFunctionName().getText()).append(function.getBeginFunctionArgsToken().getText());
  String functionPrefix=functionTextBuilder.toString();
  for (  IParamValueToken token : argumentTokens) {
    functionTextBuilder.append(token.getGuiString());
  }
  String functionSuffix=function.getEndFunctionArgsToken().getText();
  functionTextBuilder.append(functionSuffix);
  m_paramValueTokens.add(new FunctionToken(functionTextBuilder.toString(),functionPrefix,functionSuffix,function.getFunctionToken().getPos(),m_paramDesc,argumentTokens));
}

Fixed version (ground truth):
@Override public void caseAFunction(AFunction function){
  if (function.getFunctionName() == null || StringUtils.isEmpty(function.getFunctionName().getText())) {
    throw new SemanticParsingException(I18n.getString(MessageIDs.getMessage(MessageIDs.E_MISSING_FUNCTION_NAME)),MessageIDs.E_MISSING_FUNCTION_NAME,function.getFunctionToken().getPos());
  }
  ParsedParameter argumentParser=new ParsedParameter(m_isGuiSource,m_paramNode,m_paramDesc);
  PFunctionArgList functionArgList=function.getFunctionArgList();
  if (functionArgList != null) {
    functionArgList.apply(argumentParser);
  }
  IParamValueToken[] argumentTokens=argumentParser.getTokens().toArray(new IParamValueToken[argumentParser.getTokens().size()]);
  StringBuilder functionTextBuilder=new StringBuilder();
  functionTextBuilder.append(function.getFunctionToken().getText()).append(function.getFunctionName().getText()).append(function.getBeginFunctionArgsToken().getText());
  String functionPrefix=functionTextBuilder.toString();
  for (  IParamValueToken token : argumentTokens) {
    if (m_isGuiSource) {
      functionTextBuilder.append(token.getGuiString());
    }
 else {
      functionTextBuilder.append(token.getModelString());
    }
  }
  String functionSuffix=function.getEndFunctionArgsToken().getText();
  functionTextBuilder.append(functionSuffix);
  m_paramValueTokens.add(new FunctionToken(functionTextBuilder.toString(),functionPrefix,functionSuffix,function.getFunctionToken().getPos(),m_paramDesc,argumentTokens));
}
Program: 96141
Project: 96141
Buggy source:
@Override public String evaluate(String[] arguments) throws InvalidDataException {
  validateParamCount(arguments,2);
  try {
    Long dateTime=Long.valueOf(arguments[0]);
    if (dateTime < 0) {
      throw new InvalidDataException("String_Node_Str" + dateTime,MessageIDs.E_TOO_SMALL_VALUE);
    }
    Date date=new Date(dateTime);
    return DateFormatUtils.format(date,arguments[1]);
  }
 catch (  NumberFormatException e) {
    throw new InvalidDataException("String_Node_Str" + arguments[0],MessageIDs.E_BAD_INT);
  }
}

Fixed version (ground truth):
public String evaluate(String[] arguments) throws InvalidDataException {
  validateParamCount(arguments,2);
  try {
    Long dateTime=Long.valueOf(arguments[0]);
    if (dateTime < 0) {
      throw new InvalidDataException("String_Node_Str" + dateTime,MessageIDs.E_TOO_SMALL_VALUE);
    }
    Date date=new Date(dateTime);
    return DateFormatUtils.format(date,arguments[1]);
  }
 catch (  NumberFormatException e) {
    throw new InvalidDataException("String_Node_Str" + arguments[0],MessageIDs.E_BAD_INT);
  }
}
Program: 96143
Project: 96143
Buggy source:
@Override public String evaluate(String[] arguments) throws InvalidDataException {
  Date now=new Date();
  return String.valueOf(now.getTime());
}

Fixed version (ground truth):
public String evaluate(String[] arguments) throws InvalidDataException {
  Date now=new Date();
  return String.valueOf(now.getTime());
}
Program: 96144
Project: 96144
Buggy source:
@Override public String evaluate(String[] arguments) throws InvalidDataException {
  validateParamCount(arguments,2);
  try {
    Date result=DateUtils.parseDate(arguments[0],new String[]{arguments[1]});
    return String.valueOf(result.getTime());
  }
 catch (  ParseException e) {
    throw new InvalidDataException("String_Node_Str" + e.getMessage(),MessageIDs.E_WRONG_PARAMETER_VALUE);
  }
}

Fixed version (ground truth):
public String evaluate(String[] arguments) throws InvalidDataException {
  validateParamCount(arguments,2);
  try {
    Date result=DateUtils.parseDate(arguments[0],new String[]{arguments[1]});
    return String.valueOf(result.getTime());
  }
 catch (  ParseException e) {
    throw new InvalidDataException("String_Node_Str" + e.getMessage(),MessageIDs.E_WRONG_PARAMETER_VALUE);
  }
}
Program: 96145
Project: 96145
Buggy source:
public void run(){
  getTreeViewer().refresh();
}

Fixed version (ground truth):
public void run(){
  getTreeViewer().setInput(null);
  getTreeViewer().refresh();
}
Program: 96146
Project: 96146
Buggy source:
/** 
 * {@inheritDoc} 
 */
public void dispose(){
  try {
    DataEventDispatcher ded=DataEventDispatcher.getInstance();
    ded.removeDataChangedListener(this);
    ded.removeProblemPropagationListener(this);
    getViewSite().getWorkbenchWindow().getSelectionService().removeSelectionListener(m_actionListener);
    getTreeViewer().removeDoubleClickListener(m_doubleClickListener);
    Plugin.getDefault().getTreeViewerContainer().remove(this);
  }
  finally {
    super.dispose();
  }
}

Fixed version (ground truth):
/** 
 * {@inheritDoc} 
 */
public void dispose(){
  try {
    DataEventDispatcher ded=DataEventDispatcher.getInstance();
    ded.removeDataChangedListener(this);
    getViewSite().getWorkbenchWindow().getSelectionService().removeSelectionListener(m_actionListener);
    getTreeViewer().removeDoubleClickListener(m_doubleClickListener);
    Plugin.getDefault().getTreeViewerContainer().remove(this);
  }
  finally {
    super.dispose();
  }
}
Program: 96147
Project: 96147
Buggy source:
/** 
 * {@inheritDoc}
 */
public void createPartControl(Composite parent){
  m_cutTreeItemAction=new CutTreeItemActionTCBrowser();
  m_pasteTreeItemAction=new PasteTreeItemActionTCBrowser();
  m_moveTestCaseAction=new MoveTestCaseAction();
  super.createPartControl(parent);
  ColumnViewerToolTipSupport.enableFor(getTreeViewer());
  getTreeViewer().setContentProvider(new TestCaseBrowserContentProvider());
  DecoratingCellLabelProvider lp=new DecoratingCellLabelProvider(new TestCaseBrowserLabelProvider(),Plugin.getDefault().getWorkbench().getDecoratorManager().getLabelDecorator());
  getTreeViewer().setLabelProvider(lp);
  int ops=DND.DROP_MOVE;
  Transfer[] transfers=new Transfer[]{LocalSelectionTransfer.getInstance()};
  getTreeViewer().addDragSupport(ops,transfers,new TreeViewerContainerDragSourceListener(getTreeViewer()));
  getTreeViewer().addDropSupport(ops,transfers,new TestSpecDropTargetListener(this));
  registerContextMenu();
  Plugin.getHelpSystem().setHelp(getTreeViewer().getControl(),ContextHelpIds.TEST_SPEC_VIEW);
  configureActionBars();
  if (GeneralStorage.getInstance().getProject() != null) {
    handleProjectLoaded();
  }
  DataEventDispatcher.getInstance().addProblemPropagationListener(this);
  Plugin.getDefault().getTreeViewerContainer().add(this);
}

Fixed version (ground truth):
/** 
 * {@inheritDoc}
 */
public void createPartControl(Composite parent){
  m_cutTreeItemAction=new CutTreeItemActionTCBrowser();
  m_pasteTreeItemAction=new PasteTreeItemActionTCBrowser();
  m_moveTestCaseAction=new MoveTestCaseAction();
  super.createPartControl(parent);
  ColumnViewerToolTipSupport.enableFor(getTreeViewer());
  getTreeViewer().setContentProvider(new TestCaseBrowserContentProvider());
  DecoratingCellLabelProvider lp=new DecoratingCellLabelProvider(new TestCaseBrowserLabelProvider(),Plugin.getDefault().getWorkbench().getDecoratorManager().getLabelDecorator());
  getTreeViewer().setLabelProvider(lp);
  int ops=DND.DROP_MOVE;
  Transfer[] transfers=new Transfer[]{LocalSelectionTransfer.getInstance()};
  getTreeViewer().addDragSupport(ops,transfers,new TreeViewerContainerDragSourceListener(getTreeViewer()));
  getTreeViewer().addDropSupport(ops,transfers,new TestSpecDropTargetListener(this));
  registerContextMenu();
  Plugin.getHelpSystem().setHelp(getTreeViewer().getControl(),ContextHelpIds.TEST_SPEC_VIEW);
  configureActionBars();
  if (GeneralStorage.getInstance().getProject() != null) {
    handleProjectLoaded();
  }
  Plugin.getDefault().getTreeViewerContainer().add(this);
}
Program: 96148
Project: 96148
Buggy source:
/** 
 * deleting monitoring reports by age (days of existence)  or deleting all, if the summaryId is null.
 * @param session The current session (EntityManager)
 * @param summaryId The summaryToDelete. This value can be null, if all test results were deleted. if summaryId is null, all monitoring reports will also be deleted.  
 */
private static void deleteMonitoringReports(EntityManager session,Long summaryId){
  ITestResultSummaryPO summaryPo=null;
  if (summaryId != null) {
    summaryPo=session.find(PoMaker.getTestResultSummaryClass(),summaryId);
    if (summaryPo != null) {
      summaryPo.setMonitoringReport(null);
      summaryPo.setReportWritten(false);
    }
  }
 else {
    StringBuilder queryBuilder=new StringBuilder();
    queryBuilder.append("String_Node_Str").append(PoMaker.getTestResultSummaryClass().getSimpleName()).append("String_Node_Str");
    Query q=session.createQuery(queryBuilder.toString());
    q.setParameter("String_Node_Str",true);
    @SuppressWarnings("String_Node_Str") List<ITestResultSummaryPO> reportList=q.getResultList();
    for (    ITestResultSummaryPO summary : reportList) {
      summary.setMonitoringReport(null);
      summary.setReportWritten(false);
    }
  }
}

Fixed version (ground truth):
/** 
 * deleting monitoring reports by age (days of existence)  or deleting all, if the summaryId is null.
 * @param session The current session (EntityManager)
 * @param summaryId The summaryToDelete. This value can be null, if all test results were deleted. if summaryId is null, all monitoring reports will also be deleted.  
 */
private static void deleteMonitoringReports(EntityManager session,Long summaryId){
  ITestResultSummaryPO summaryPo=null;
  if (summaryId != null) {
    summaryPo=session.find(PoMaker.getTestResultSummaryClass(),summaryId);
    if (summaryPo != null) {
      summaryPo.setMonitoringReport(null);
      summaryPo.setReportWritten(false);
    }
  }
 else {
    Query deleteMonitoringReportsQuery=session.createQuery("String_Node_Str" + PoMaker.getMonitoringReportClass().getSimpleName());
    deleteMonitoringReportsQuery.executeUpdate();
    session.flush();
    StringBuilder queryBuilder=new StringBuilder();
    queryBuilder.append("String_Node_Str").append(PoMaker.getTestResultSummaryClass().getSimpleName()).append("String_Node_Str");
    Query q=session.createQuery(queryBuilder.toString());
    q.setParameter("String_Node_Str",true);
    @SuppressWarnings("String_Node_Str") List<ITestResultSummaryPO> reportList=q.getResultList();
    for (    ITestResultSummaryPO summary : reportList) {
      summary.setMonitoringReport(null);
      summary.setReportWritten(false);
    }
  }
}
Program: 96149
Project: 96149
Buggy source:
/** 
 * delete test result elements of selected summary
 * @param resultId id of test result
 */
private static final void deleteTestresultOfSummary(Long resultId){
  Persistor persistor=Persistor.instance();
  if (persistor == null) {
    return;
  }
  final EntityManager session=persistor.openSession();
  try {
    final EntityTransaction tx=persistor.getTransaction(session);
    persistor.lockDB();
    executeDeleteTestresultOfSummary(session,resultId);
    deleteMonitoringReports(session,resultId);
    persistor.commitTransaction(session,tx);
  }
 catch (  PMException e) {
    throw new JBFatalException(Messages.DeleteTestresultElementFailed,e,MessageIDs.E_DATABASE_GENERAL);
  }
catch (  ProjectDeletedException e) {
    throw new JBFatalException(Messages.DeleteTestresultElementFailed,e,MessageIDs.E_PROJECT_NOT_FOUND);
  }
 finally {
    persistor.dropSession(session);
    persistor.unlockDB();
  }
}

Fixed version (ground truth):
/** 
 * delete test result elements of selected summary
 * @param resultId id of test result
 */
private static final void deleteTestresultOfSummary(Long resultId){
  Persistor persistor=Persistor.instance();
  if (persistor == null) {
    return;
  }
  final EntityManager session=persistor.openSession();
  try {
    final EntityTransaction tx=persistor.getTransaction(session);
    persistor.lockDB();
    executeDeleteTestresultOfSummary(session,resultId);
    deleteMonitoringReports(session,resultId);
    persistor.commitTransaction(session,tx);
  }
 catch (  PMException e) {
    throw new JBFatalException(Messages.DeleteTestresultElementFailed,e,MessageIDs.E_DATABASE_GENERAL);
  }
catch (  ProjectDeletedException e) {
    throw new JBFatalException(Messages.DeleteTestresultElementFailed,e,MessageIDs.E_PROJECT_NOT_FOUND);
  }
 finally {
    persistor.dropSessionWithoutLockRelease(session);
    persistor.unlockDB();
  }
}
Program: 96150
Project: 96150
Buggy source:
/** 
 * {@inheritDoc}
 */
public Map<String,String> requestAutConfigMapFromAgent(String autId){
  Map<String,String> autConfigMap=null;
  GetAutConfigMapMessage message=new GetAutConfigMapMessage(autId);
  GetAutConfigMapResponseCommand response=new GetAutConfigMapResponseCommand();
  try {
    ServerConnection.getInstance().request(message,response,REQUEST_CONFIG_MAP_TIMEOUT);
    final AtomicBoolean timeoutFlag=new AtomicBoolean(true);
    final Timer timerTimeout=new Timer();
    timerTimeout.schedule(new TimerTask(){
      public void run(){
        timeoutFlag.set(false);
        timerTimeout.cancel();
      }
    }
,REQUEST_CONFIG_MAP_TIMEOUT);
    while (response.getAutConfigMap() == null && timeoutFlag.get()) {
      TimeUtil.delay(200);
      log.info(Messages.WaitingForAutConfigMapFromAgent);
    }
    autConfigMap=response.getAutConfigMap();
  }
 catch (  NotConnectedException nce) {
    log.error(DebugConstants.ERROR,nce);
  }
catch (  CommunicationException ce) {
    log.error(DebugConstants.ERROR,ce);
  }
  return autConfigMap;
}

Fixed version (ground truth):
/** 
 * {@inheritDoc} 
 */
public Map<String,String> requestAutConfigMapFromAgent(String autId){
  Map<String,String> autConfigMap=null;
  GetAutConfigMapMessage message=new GetAutConfigMapMessage(autId);
  GetAutConfigMapResponseCommand response=new GetAutConfigMapResponseCommand();
  try {
    ServerConnection.getInstance().request(message,response,REQUEST_CONFIG_MAP_TIMEOUT);
    final AtomicBoolean timeoutFlag=new AtomicBoolean(true);
    final Timer timerTimeout=new Timer();
    timerTimeout.schedule(new TimerTask(){
      public void run(){
        timeoutFlag.set(false);
        timerTimeout.cancel();
      }
    }
,REQUEST_CONFIG_MAP_TIMEOUT);
    while (!response.hasReceivedResponse() && timeoutFlag.get()) {
      TimeUtil.delay(200);
      log.info(Messages.WaitingForAutConfigMapFromAgent);
    }
    autConfigMap=response.getAutConfigMap();
  }
 catch (  NotConnectedException nce) {
    log.error(DebugConstants.ERROR,nce);
  }
catch (  CommunicationException ce) {
    log.error(DebugConstants.ERROR,ce);
  }
  return autConfigMap;
}
Program: 96151
Project: 96151
Buggy source:
/** 
 * {@inheritDoc}
 */
public Message execute(){
  setAutConfigMap(m_message.getAutConfigMap());
  return null;
}

Fixed version (ground truth):
/** 
 * {@inheritDoc}
 */
public Message execute(){
  setReceivedResponse(true);
  setAutConfigMap(m_message.getAutConfigMap());
  return null;
}
Program: 96152
Project: 96152
Buggy source:
/** 
 * this method delays the test execution start during AUT startup
 */
private void waitExternalTime(){
  int timeToWait=AUT_STARTUP_DELAY_DEFAULT;
  try {
    String value=EnvironmentUtils.getProcessEnvironment().getProperty(AUT_STARTUP_DELAY_VAR);
    if (value == null) {
      value=System.getProperty(AUT_STARTUP_DELAY_VAR);
    }
    timeToWait=Integer.valueOf(value).intValue();
  }
 catch (  NumberFormatException e) {
  }
  try {
    Thread.sleep(timeToWait);
  }
 catch (  InterruptedException e) {
  }
}

Fixed version (ground truth):
/** 
 * this method delays the test execution start during AUT startup
 */
private void waitExternalTime(){
  int timeToWait=AUT_STARTUP_DELAY_DEFAULT;
  try {
    String value=EnvironmentUtils.getProcessEnvironment().getProperty(AUT_STARTUP_DELAY_VAR);
    if (value == null) {
      value=System.getProperty(AUT_STARTUP_DELAY_VAR);
    }
    timeToWait=Integer.valueOf(value).intValue();
  }
 catch (  NumberFormatException e) {
  }
  TimeUtil.delay(timeToWait);
}
Program: 96153
Project: 96153
Buggy source:
/** 
 * @param areaComposite The composite for which to create and set a layout.
 */
private void createLayout(Composite areaComposite){
  areaComposite.setLayout(LayoutUtil.createDefaultGridLayout(NUM_COLUMNS));
  GridData gridData=new GridData(GridData.BEGINNING);
  gridData.horizontalSpan=NUM_COLUMNS;
  areaComposite.setLayoutData(gridData);
}

Fixed version (ground truth):
/** 
 * @param areaComposite The composite for which to create and set a layout.
 */
private void createLayout(Composite areaComposite){
  areaComposite.setLayout(createDefaultGridLayout(NUM_COLUMNS));
  GridData gridData=new GridData(GridData.BEGINNING);
  gridData.horizontalSpan=NUM_COLUMNS;
  areaComposite.setLayoutData(gridData);
}
Program: 96155
Project: 96155
Buggy source:
/** 
 * @param parent The parent Composite.
 */
private void initGuiEnvironmentEditor(Composite parent){
  UIComponentHelper.createLabel(parent,"String_Node_Str");
  m_envTextArea=new JBText(parent,LayoutUtil.MULTI_TEXT_STYLE);
  LayoutUtil.setMaxChar(m_envTextArea,4000);
  GridData textGridData=new GridData();
  textGridData.horizontalAlignment=GridData.FILL;
  textGridData.horizontalSpan=2;
  textGridData.grabExcessHorizontalSpace=false;
  textGridData.widthHint=COMPOSITE_WIDTH;
  textGridData.heightHint=Dialog.convertHeightInCharsToPixels(LayoutUtil.getFontMetrics(m_envTextArea),5);
  m_envTextArea.setLayoutData(textGridData);
}

Fixed version (ground truth):
/** 
 * @param parent The parent Composite.
 */
private void initGuiEnvironmentEditor(Composite parent){
  UIComponentHelper.createLabel(parent,"String_Node_Str");
  m_envTextArea=new JBText(parent,LayoutUtil.MULTI_TEXT | SWT.V_SCROLL);
  LayoutUtil.setMaxChar(m_envTextArea,4000);
  GridData textGridData=new GridData();
  textGridData.horizontalAlignment=GridData.FILL;
  textGridData.horizontalSpan=2;
  textGridData.grabExcessHorizontalSpace=false;
  textGridData.widthHint=COMPOSITE_WIDTH;
  textGridData.heightHint=Dialog.convertHeightInCharsToPixels(LayoutUtil.getFontMetrics(m_envTextArea),2);
  m_envTextArea.setLayoutData(textGridData);
}