nus-yam/ex-repair huggingface dataset:
Program: 60682
Project: 60682
Buggy source:
/** 
 * 下载配置文件, remoteUrl是 url
 * @param url
 * @param fileName
 * @return
 * @throws Exception
 */
public String downloadFileFromServer(String url,String fileName) throws Exception {
  String localTmpDir=getLocalDownloadDirPath(true);
  String localDir=getLocalDownloadDirPath(false);
  RemoteUrl remoteUrl=new RemoteUrl(url,hostList);
  return restfulMgr.downloadFromServer(remoteUrl,fileName,localTmpDir,localDir,this.enableLocalDownloadDirInClassPath,retryTime,retrySleepSeconds);
}

Fixed version (ground truth):
/** 
 * 下载配置文件, remoteUrl是 url
 * @param url
 * @param fileName
 * @return
 * @throws Exception
 */
public String downloadFileFromServer(String url,String fileName) throws Exception {
  String localDir=getLocalDownloadDirPath(false);
  RemoteUrl remoteUrl=new RemoteUrl(url,hostList);
  return restfulMgr.downloadFromServer(remoteUrl,fileName,localDir,this.enableLocalDownloadDirInClassPath,retryTime,retrySleepSeconds);
}
Program: 60683
Project: 60683
Buggy source:
/** 
 * @param remoteUrl 远程地址
 * @param fileName 文件名
 * @param localTmpFileDir 本地临时 文件地址
 * @param localFileDir 本地文件地址
 * @param isTransfer2Classpath 是否将下载的文件放到Classpath目录下
 * @return 如果是放到Classpath目录下，则返回相对Classpath的路径，如果不是，则返回全路径
 * @throws Exception
 */
String downloadFromServer(RemoteUrl remoteUrl,String fileName,String localTmpFileDir,String localFileDir,boolean isTransfer2Classpath,int retryTimes,int retyrSleepSeconds) throws Exception ;

Fixed version (ground truth):
/** 
 * @param remoteUrl 远程地址
 * @param fileName 文件名
 * @param localFileDir 本地文件地址
 * @param isTransfer2Classpath 是否将下载的文件放到Classpath目录下
 * @return 如果是放到Classpath目录下，则返回相对Classpath的路径，如果不是，则返回全路径
 * @throws Exception
 */
String downloadFromServer(RemoteUrl remoteUrl,String fileName,String localFileDir,boolean isTransfer2Classpath,int retryTimes,int retyrSleepSeconds) throws Exception ;
Program: 60685
Project: 60685
Buggy source:
@Override public ConfListVo transfer(Config input){
  String appNameString=app.getName();
  String envName=env.getName();
  ConfListVo configListVo=convert(input,appNameString,envName,myzkDataMap.get(input.getName()));
  if (myFetchZk) {
    configListVo.setValue("String_Node_Str");
    configListVo.setMachineList(new ArrayList<ZkDisconfData.ZkDisconfDataItem>());
  }
  return configListVo;
}

Fixed version (ground truth):
@Override public ConfListVo transfer(Config input){
  String appNameString=app.getName();
  String envName=env.getName();
  ZkDisconfData zkDisconfData=null;
  if (myzkDataMap != null && myzkDataMap.keySet().contains(input.getName())) {
    zkDisconfData=myzkDataMap.get(input.getName());
  }
  ConfListVo configListVo=convert(input,appNameString,envName,zkDisconfData);
  if (myFetchZk) {
    configListVo.setValue("String_Node_Str");
    configListVo.setMachineList(new ArrayList<ZkDisconfData.ZkDisconfDataItem>());
  }
  return configListVo;
}
Program: 60686
Project: 60686
Buggy source:
/** 
 * 配置列表
 */
@Override public DaoPageResult<ConfListVo> getConfigList(ConfListForm confListForm,boolean fetchZk){
  DaoPageResult<Config> configList=configDao.getConfigList(confListForm.getAppId(),confListForm.getEnvId(),confListForm.getVersion(),confListForm.getPage());
  final App app=appMgr.getById(confListForm.getAppId());
  final Env env=envMgr.getById(confListForm.getEnvId());
  final boolean myFetchZk=fetchZk;
  Map<String,ZkDisconfData> zkDataMap=null;
  if (myFetchZk) {
    zkDataMap=zkDeployMgr.getZkDisconfDataMap(app.getName(),env.getName(),confListForm.getVersion());
  }
  final Map<String,ZkDisconfData> myzkDataMap=zkDataMap;
  DaoPageResult<ConfListVo> configListVo=ServiceUtil.getResult(configList,new DataTransfer<Config,ConfListVo>(){
    @Override public ConfListVo transfer(    Config input){
      String appNameString=app.getName();
      String envName=env.getName();
      ConfListVo configListVo=convert(input,appNameString,envName,myzkDataMap.get(input.getName()));
      if (myFetchZk) {
        configListVo.setValue("String_Node_Str");
        configListVo.setMachineList(new ArrayList<ZkDisconfData.ZkDisconfDataItem>());
      }
      return configListVo;
    }
  }
);
  return configListVo;
}

Fixed version (ground truth):
/** 
 * 配置列表
 */
@Override public DaoPageResult<ConfListVo> getConfigList(ConfListForm confListForm,boolean fetchZk){
  DaoPageResult<Config> configList=configDao.getConfigList(confListForm.getAppId(),confListForm.getEnvId(),confListForm.getVersion(),confListForm.getPage());
  final App app=appMgr.getById(confListForm.getAppId());
  final Env env=envMgr.getById(confListForm.getEnvId());
  final boolean myFetchZk=fetchZk;
  Map<String,ZkDisconfData> zkDataMap=new HashMap<String,ZkDisconfData>();
  if (myFetchZk) {
    zkDataMap=zkDeployMgr.getZkDisconfDataMap(app.getName(),env.getName(),confListForm.getVersion());
  }
  final Map<String,ZkDisconfData> myzkDataMap=zkDataMap;
  DaoPageResult<ConfListVo> configListVo=ServiceUtil.getResult(configList,new DataTransfer<Config,ConfListVo>(){
    @Override public ConfListVo transfer(    Config input){
      String appNameString=app.getName();
      String envName=env.getName();
      ZkDisconfData zkDisconfData=null;
      if (myzkDataMap != null && myzkDataMap.keySet().contains(input.getName())) {
        zkDisconfData=myzkDataMap.get(input.getName());
      }
      ConfListVo configListVo=convert(input,appNameString,envName,zkDisconfData);
      if (myFetchZk) {
        configListVo.setValue("String_Node_Str");
        configListVo.setMachineList(new ArrayList<ZkDisconfData.ZkDisconfDataItem>());
      }
      return configListVo;
    }
  }
);
  return configListVo;
}
Program: 60687
Project: 60687
Buggy source:
/** 
 */
private List<String> compareConifg(String zkData,String dbData){
  List<String> errorKeyList=new ArrayList<String>();
  Properties prop=new Properties();
  try {
    prop.load(IOUtils.toInputStream(dbData,"String_Node_Str"));
  }
 catch (  IOException e) {
    LOG.error(e.toString());
    errorKeyList.add(zkData);
    return errorKeyList;
  }
  Map<String,String> zkMap=GsonUtils.parse2Map(zkData);
  for (  String keyInZk : zkMap.keySet()) {
    Object valueInDb=prop.get(keyInZk);
    if (!zkMap.get(keyInZk).equals(valueInDb.toString().trim())) {
      errorKeyList.add(keyInZk);
    }
  }
  return errorKeyList;
}

Fixed version (ground truth):
/** 
 */
private List<String> compareConifg(String zkData,String dbData){
  List<String> errorKeyList=new ArrayList<String>();
  Properties prop=new Properties();
  try {
    prop.load(IOUtils.toInputStream(dbData,"String_Node_Str"));
  }
 catch (  IOException e) {
    LOG.error(e.toString());
    errorKeyList.add(zkData);
    return errorKeyList;
  }
  Map<String,String> zkMap=GsonUtils.parse2Map(zkData);
  for (  String keyInZk : zkMap.keySet()) {
    Object valueInDb=prop.get(keyInZk);
    try {
      if (!zkMap.get(keyInZk).equals(valueInDb.toString().trim())) {
        errorKeyList.add(keyInZk);
      }
    }
 catch (    Exception e) {
      LOG.warn(e.toString() + "String_Node_Str" + zkMap.get(keyInZk)+ "String_Node_Str"+ valueInDb);
    }
  }
  return errorKeyList;
}
Program: 60688
Project: 60688
Buggy source:
/** 
 * 存储 一个配置文件
 */
public void storeOneFile(DisconfCenterBaseModel disconfCenterBaseModel){
  DisconfCenterFile disconfCenterFile=(DisconfCenterFile)disconfCenterBaseModel;
  String fileName=disconfCenterFile.getFileName();
  if (confFileMap.containsKey(fileName)) {
    LOGGER.error("String_Node_Str" + "String_Node_Str" + confFileMap.get(fileName).getCls().toString() + "String_Node_Str"+ disconfCenterFile.toString());
  }
 else {
    confFileMap.put(fileName,disconfCenterFile);
  }
}

Fixed version (ground truth):
/** 
 * 存储 一个配置文件
 */
public void storeOneFile(DisconfCenterBaseModel disconfCenterBaseModel){
  DisconfCenterFile disconfCenterFile=(DisconfCenterFile)disconfCenterBaseModel;
  String fileName=disconfCenterFile.getFileName();
  if (confFileMap.containsKey(fileName)) {
    LOGGER.error("String_Node_Str" + "String_Node_Str" + confFileMap.get(fileName).toString() + "String_Node_Str"+ disconfCenterFile.toString());
  }
 else {
    confFileMap.put(fileName,disconfCenterFile);
  }
}
Program: 60689
Project: 60689
Buggy source:
/** 
 */
private List<DisconfCenterBaseModel> getDisconfCenterFiles(ScanStaticModel scanModel){
  DisconfCenterFile disconfCenterFile=new DisconfCenterFile();
  List<DisconfCenterBaseModel> disconfCenterFiles=new ArrayList<DisconfCenterBaseModel>();
  for (  String fileName : scanModel.getNonAnnotationFileSet()) {
    disconfCenterFile.setFileName(fileName);
    DisConfCommonModel disConfCommonModel=makeDisConfCommonModel("String_Node_Str","String_Node_Str");
    disconfCenterFile.setDisConfCommonModel(disConfCommonModel);
    String url=DisconfWebPathMgr.getRemoteUrlParameter(DisClientSysConfig.getInstance().CONF_SERVER_STORE_ACTION,disConfCommonModel.getApp(),disConfCommonModel.getVersion(),disConfCommonModel.getEnv(),disconfCenterFile.getFileName(),DisConfigTypeEnum.FILE);
    disconfCenterFile.setRemoteServerUrl(url);
    disconfCenterFiles.add(disconfCenterFile);
  }
  return disconfCenterFiles;
}

Fixed version (ground truth):
/** 
 */
private List<DisconfCenterBaseModel> getDisconfCenterFiles(ScanStaticModel scanModel){
  List<DisconfCenterBaseModel> disconfCenterFiles=new ArrayList<DisconfCenterBaseModel>();
  for (  String fileName : scanModel.getNonAnnotationFileSet()) {
    DisconfCenterFile disconfCenterFile=new DisconfCenterFile();
    disconfCenterFile.setFileName(fileName);
    DisConfCommonModel disConfCommonModel=makeDisConfCommonModel("String_Node_Str","String_Node_Str");
    disconfCenterFile.setDisConfCommonModel(disConfCommonModel);
    String url=DisconfWebPathMgr.getRemoteUrlParameter(DisClientSysConfig.getInstance().CONF_SERVER_STORE_ACTION,disConfCommonModel.getApp(),disConfCommonModel.getVersion(),disConfCommonModel.getEnv(),disconfCenterFile.getFileName(),DisConfigTypeEnum.FILE);
    disconfCenterFile.setRemoteServerUrl(url);
    disconfCenterFiles.add(disconfCenterFile);
  }
  return disconfCenterFiles;
}
Program: 60692
Project: 60692
Buggy source:
@Override public void processAllItems(){
  for (  String fileName : disconfStoreProcessor.getConfKeySet()) {
    LOGGER.debug("String_Node_Str" + fileName + "String_Node_Str");
    DisconfCenterFile disconfCenterFile=(DisconfCenterFile)disconfStoreProcessor.getConfData(fileName);
    try {
      updateOneConfFile(fileName,disconfCenterFile);
    }
 catch (    Exception e) {
      LOGGER.error(e.toString(),e);
    }
  }
}

Fixed version (ground truth):
/** 
 */
@Override public void processAllItems(){
  for (  String fileName : disconfStoreProcessor.getConfKeySet()) {
    LOGGER.debug("String_Node_Str" + fileName + "String_Node_Str");
    DisconfCenterFile disconfCenterFile=(DisconfCenterFile)disconfStoreProcessor.getConfData(fileName);
    try {
      updateOneConfFile(fileName,disconfCenterFile);
    }
 catch (    Exception e) {
      LOGGER.error(e.toString(),e);
    }
  }
}
Program: 60693
Project: 60693
Buggy source:
@Override public void inject2Conf(){
  for (  String key : disconfStoreProcessor.getConfKeySet()) {
    LOGGER.debug("String_Node_Str" + key + "String_Node_Str");
    DisconfCenterFile disconfCenterFile=(DisconfCenterFile)disconfStoreProcessor.getConfData(key);
    if (disconfCenterFile == null) {
      continue;
    }
    try {
      Object object=null;
      try {
        object=disconfCenterFile.getObject();
        if (object == null) {
          object=DisconfCoreProcessUtils.getSpringBean(disconfCenterFile.getCls());
        }
      }
 catch (      Exception e) {
        LOGGER.debug(disconfCenterFile.getCls() + "String_Node_Str");
        object=null;
      }
      disconfStoreProcessor.inject2Instance(object,key);
    }
 catch (    Exception e) {
      LOGGER.warn(e.toString(),e);
    }
  }
}

Fixed version (ground truth):
@Override public void inject2Conf(){
  for (  String key : disconfStoreProcessor.getConfKeySet()) {
    LOGGER.debug("String_Node_Str" + key + "String_Node_Str");
    DisconfCenterFile disconfCenterFile=(DisconfCenterFile)disconfStoreProcessor.getConfData(key);
    inject2OneConf(key,disconfCenterFile);
  }
}
Program: 60694
Project: 60694
Buggy source:
/** 
 * 更新 一個配置文件
 */
private void updateOneConfFile(String fileName,DisconfCenterFile disconfCenterFile) throws Exception {
  if (disconfCenterFile == null) {
    throw new Exception("String_Node_Str" + fileName);
  }
  String filePath="String_Node_Str";
  Properties properties=null;
  try {
    String url=disconfCenterFile.getRemoteServerUrl();
    filePath=fetcherMgr.downloadFileFromServer(url,fileName);
    properties=ConfigLoaderUtils.loadConfig(filePath);
  }
 catch (  Exception e) {
    LOGGER.error(e.toString());
    LOGGER.warn("String_Node_Str" + fileName);
    properties=ConfigLoaderUtils.loadConfig(fileName);
  }
  LOGGER.debug("String_Node_Str");
  Set<Entry<Object,Object>> set=properties.entrySet();
  for (  Entry<Object,Object> entry : set) {
    LOGGER.debug(entry.toString());
  }
  disconfStoreProcessor.inject2Store(fileName,new DisconfValue(null,properties));
  LOGGER.debug("String_Node_Str");
  DisConfCommonModel disConfCommonModel=disconfStoreProcessor.getCommonModel(fileName);
  if (watchMgr != null) {
    watchMgr.watchPath(this,disConfCommonModel,fileName,DisConfigTypeEnum.FILE,GsonUtils.toJson(disconfCenterFile.getKV()));
    LOGGER.debug("String_Node_Str");
  }
 else {
    LOGGER.warn("String_Node_Str",fileName);
  }
}

Fixed version (ground truth):
/** 
 * 更新 一個配置文件, 下载、注入到仓库、Watch 三步骤
 */
private void updateOneConfFile(String fileName,DisconfCenterFile disconfCenterFile) throws Exception {
  if (disconfCenterFile == null) {
    throw new Exception("String_Node_Str" + fileName);
  }
  String filePath="String_Node_Str";
  Properties properties=null;
  try {
    String url=disconfCenterFile.getRemoteServerUrl();
    filePath=fetcherMgr.downloadFileFromServer(url,fileName);
    properties=ConfigLoaderUtils.loadConfig(filePath);
  }
 catch (  Exception e) {
    LOGGER.error(e.toString());
    LOGGER.warn("String_Node_Str" + fileName);
    properties=ConfigLoaderUtils.loadConfig(fileName);
  }
  LOGGER.debug("String_Node_Str");
  Set<Entry<Object,Object>> set=properties.entrySet();
  for (  Entry<Object,Object> entry : set) {
    LOGGER.debug(entry.toString());
  }
  disconfStoreProcessor.inject2Store(fileName,new DisconfValue(null,properties));
  LOGGER.debug("String_Node_Str");
  DisConfCommonModel disConfCommonModel=disconfStoreProcessor.getCommonModel(fileName);
  if (watchMgr != null) {
    watchMgr.watchPath(this,disConfCommonModel,fileName,DisConfigTypeEnum.FILE,GsonUtils.toJson(disconfCenterFile.getKV()));
    LOGGER.debug("String_Node_Str");
  }
 else {
    LOGGER.warn("String_Node_Str",fileName);
  }
}
Program: 60695
Project: 60695
Buggy source:
/** 
 */
@Override public void updateOneConf(String fileName) throws Exception {
  DisconfCenterFile disconfCenterFile=(DisconfCenterFile)disconfStoreProcessor.getConfData(fileName);
  if (disconfCenterFile != null) {
    updateOneConfFile(fileName,disconfCenterFile);
  }
}

Fixed version (ground truth):
/** 
 * 更新消息：某个配置文件
 */
private void updateOneConf(String fileName) throws Exception {
  DisconfCenterFile disconfCenterFile=(DisconfCenterFile)disconfStoreProcessor.getConfData(fileName);
  if (disconfCenterFile != null) {
    updateOneConfFile(fileName,disconfCenterFile);
    inject2OneConf(fileName,disconfCenterFile);
  }
}
Program: 60696
Project: 60696
Buggy source:
/** 
 */
@Override public void updateOneConfAndCallback(String key) throws Exception {
  updateOneConf(key);
  DisconfCoreProcessUtils.callOneConf(disconfStoreProcessor,key);
}

Fixed version (ground truth):
/** 
 * 更新消息: 某个配置文件 + 回调
 */
@Override public void updateOneConfAndCallback(String key) throws Exception {
  updateOneConf(key);
  DisconfCoreProcessUtils.callOneConf(disconfStoreProcessor,key);
}
Program: 60697
Project: 60697
Buggy source:
/** 
 */
@Override public void inject2Conf(){
  for (  String key : disconfStoreProcessor.getConfKeySet()) {
    LOGGER.debug("String_Node_Str" + key + "String_Node_Str");
    DisconfCenterItem disconfCenterItem=(DisconfCenterItem)disconfStoreProcessor.getConfData(key);
    if (disconfCenterItem == null) {
      continue;
    }
    try {
      Object object=null;
      Field field=disconfCenterItem.getField();
      if (Modifier.isStatic(field.getModifiers())) {
      }
 else {
        object=DisconfCoreProcessUtils.getSpringBean(field.getDeclaringClass());
      }
      disconfStoreProcessor.inject2Instance(object,key);
    }
 catch (    Exception e) {
      LOGGER.warn(e.toString(),e);
    }
  }
}

Fixed version (ground truth):
/** 
 */
@Override public void inject2Conf(){
  for (  String key : disconfStoreProcessor.getConfKeySet()) {
    LOGGER.debug("String_Node_Str" + key + "String_Node_Str");
    DisconfCenterItem disconfCenterItem=(DisconfCenterItem)disconfStoreProcessor.getConfData(key);
    inject2OneConf(key,disconfCenterItem);
  }
}
Program: 60698
Project: 60698
Buggy source:
/** 
 * 更新 一个配置
 */
public void updateOneConf(String keyName) throws Exception {
  DisconfCenterItem disconfCenterItem=(DisconfCenterItem)disconfStoreProcessor.getConfData(keyName);
  if (disconfCenterItem != null) {
    updateOneConfItem(keyName,disconfCenterItem);
  }
}

Fixed version (ground truth):
/** 
 * 更新 一个配置
 */
private void updateOneConf(String keyName) throws Exception {
  DisconfCenterItem disconfCenterItem=(DisconfCenterItem)disconfStoreProcessor.getConfData(keyName);
  if (disconfCenterItem != null) {
    updateOneConfItem(keyName,disconfCenterItem);
    inject2OneConf(keyName,disconfCenterItem);
  }
}
Program: 60699
Project: 60699
Buggy source:
/** 
 */
@Override public void updateOneConfAndCallback(String key) throws Exception {
  updateOneConf(key);
  DisconfCoreProcessUtils.callOneConf(disconfStoreProcessor,key);
}

Fixed version (ground truth):
/** 
 * 更新消息:
 */
@Override public void updateOneConfAndCallback(String key) throws Exception {
  updateOneConf(key);
  DisconfCoreProcessUtils.callOneConf(disconfStoreProcessor,key);
}
Program: 60700
Project: 60700
Buggy source:
/** 
 */
@Override public void inject2Store(String fileName,DisconfValue disconfValue){
  DisconfCenterFile disconfCenterFile=DisconfCenterStore.getInstance().getConfFileMap().get(fileName);
  if (disconfCenterFile == null) {
    LOGGER.error("String_Node_Str" + fileName + "String_Node_Str");
    return;
  }
  if (disconfValue == null || disconfValue.getProperties() == null) {
    LOGGER.error("String_Node_Str",fileName);
    return;
  }
  Map<String,FileItemValue> keMap=disconfCenterFile.getKeyMaps();
  for (  String fileItem : keMap.keySet()) {
    if (fileItem.equals("String_Node_Str")) {
      System.out.print("String_Node_Str");
    }
    Object object=disconfValue.getProperties().get(fileItem);
    if (object == null) {
      LOGGER.error("String_Node_Str",fileItem,disconfValue.getProperties().toString());
      continue;
    }
    try {
      Object value=ClassUtils.getValeByType(keMap.get(fileItem).getField().getType(),object);
      keMap.get(fileItem).setValue(value);
      if (disconfCenterFile.getObject() != null) {
        keMap.get(fileItem).getField().set(disconfCenterFile.getObject(),keMap.get(fileItem).getValue());
      }
    }
 catch (    Exception e) {
      LOGGER.error("String_Node_Str" + fileName + "String_Node_Str"+ e.toString(),e);
    }
  }
}

Fixed version (ground truth):
/** 
 */
@Override public void inject2Store(String fileName,DisconfValue disconfValue){
  DisconfCenterFile disconfCenterFile=DisconfCenterStore.getInstance().getConfFileMap().get(fileName);
  if (disconfCenterFile == null) {
    LOGGER.error("String_Node_Str" + fileName + "String_Node_Str");
    return;
  }
  if (disconfValue == null || disconfValue.getProperties() == null) {
    LOGGER.error("String_Node_Str",fileName);
    return;
  }
  Map<String,FileItemValue> keMap=disconfCenterFile.getKeyMaps();
  for (  String fileItem : keMap.keySet()) {
    Object object=disconfValue.getProperties().get(fileItem);
    if (object == null) {
      LOGGER.error("String_Node_Str",fileItem,disconfValue.getProperties().toString());
      continue;
    }
    try {
      Object value=ClassUtils.getValeByType(keMap.get(fileItem).getField().getType(),object);
      keMap.get(fileItem).setValue(value);
      if (disconfCenterFile.getObject() != null) {
        keMap.get(fileItem).getField().set(disconfCenterFile.getObject(),keMap.get(fileItem).getValue());
      }
    }
 catch (    Exception e) {
      LOGGER.error("String_Node_Str" + fileName + "String_Node_Str"+ e.toString(),e);
    }
  }
}
Program: 60701
Project: 60701
Buggy source:
/** 
 */
private List<DisconfCenterBaseModel> getDisconfCenterFiles(ScanStaticModel scanModel){
  List<DisconfCenterBaseModel> disconfCenterFiles=new ArrayList<DisconfCenterBaseModel>();
  for (  String fileName : scanModel.getNonAnnotationFileSet()) {
    DisconfCenterFile disconfCenterFile=new DisconfCenterFile();
    disconfCenterFile.setFileName(fileName);
    DisConfCommonModel disConfCommonModel=makeDisConfCommonModel("String_Node_Str","String_Node_Str");
    disconfCenterFile.setDisConfCommonModel(disConfCommonModel);
    String url=DisconfWebPathMgr.getRemoteUrlParameter(DisClientSysConfig.getInstance().CONF_SERVER_STORE_ACTION,disConfCommonModel.getApp(),disConfCommonModel.getVersion(),disConfCommonModel.getEnv(),disconfCenterFile.getFileName(),DisConfigTypeEnum.FILE);
    disconfCenterFile.setRemoteServerUrl(url);
    disconfCenterFiles.add(disconfCenterFile);
  }
  return disconfCenterFiles;
}

Fixed version (ground truth):
/** 
 */
private List<DisconfCenterBaseModel> getDisconfCenterFiles(ScanStaticModel scanModel){
  List<DisconfCenterBaseModel> disconfCenterFiles=new ArrayList<DisconfCenterBaseModel>();
  for (  String fileName : scanModel.getNonAnnotationFileSet()) {
    fileName=fileName.trim();
    DisconfCenterFile disconfCenterFile=new DisconfCenterFile();
    disconfCenterFile.setFileName(fileName);
    DisConfCommonModel disConfCommonModel=makeDisConfCommonModel("String_Node_Str","String_Node_Str");
    disconfCenterFile.setDisConfCommonModel(disConfCommonModel);
    String url=DisconfWebPathMgr.getRemoteUrlParameter(DisClientSysConfig.getInstance().CONF_SERVER_STORE_ACTION,disConfCommonModel.getApp(),disConfCommonModel.getVersion(),disConfCommonModel.getEnv(),disconfCenterFile.getFileName(),DisConfigTypeEnum.FILE);
    disconfCenterFile.setRemoteServerUrl(url);
    disconfCenterFiles.add(disconfCenterFile);
  }
  return disconfCenterFiles;
}
Program: 60702
Project: 60702
Buggy source:
/** 
 */
@Override public void inject2Store(String fileName,DisconfValue disconfValue){
  DisconfCenterFile disconfCenterFile=DisconfCenterStore.getInstance().getConfFileMap().get(fileName);
  if (disconfCenterFile == null) {
    LOGGER.error("String_Node_Str" + fileName + "String_Node_Str");
    return;
  }
  if (disconfValue == null || disconfValue.getProperties() == null) {
    LOGGER.error("String_Node_Str",fileName);
    return;
  }
  Map<String,FileItemValue> keMap=disconfCenterFile.getKeyMaps();
  for (  String fileItem : keMap.keySet()) {
    Object object=disconfValue.getProperties().get(fileItem);
    if (object == null) {
      LOGGER.error("String_Node_Str",fileItem,disconfValue.getProperties().toString());
      continue;
    }
    try {
      Object value=ClassUtils.getValeByType(keMap.get(fileItem).getField().getType(),(String)object);
      keMap.get(fileItem).setValue(value);
      if (disconfCenterFile.getObject() != null) {
        keMap.get(fileItem).getField().set(disconfCenterFile.getObject(),keMap.get(fileItem).getValue());
      }
    }
 catch (    Exception e) {
      LOGGER.error(e.toString(),e);
    }
  }
}

Fixed version (ground truth):
/** 
 */
@Override public void inject2Store(String fileName,DisconfValue disconfValue){
  DisconfCenterFile disconfCenterFile=DisconfCenterStore.getInstance().getConfFileMap().get(fileName);
  if (disconfCenterFile == null) {
    LOGGER.error("String_Node_Str" + fileName + "String_Node_Str");
    return;
  }
  if (disconfValue == null || disconfValue.getProperties() == null) {
    LOGGER.error("String_Node_Str",fileName);
    return;
  }
  Map<String,FileItemValue> keMap=disconfCenterFile.getKeyMaps();
  for (  String fileItem : keMap.keySet()) {
    if (fileItem.equals("String_Node_Str")) {
      System.out.print("String_Node_Str");
    }
    Object object=disconfValue.getProperties().get(fileItem);
    if (object == null) {
      LOGGER.error("String_Node_Str",fileItem,disconfValue.getProperties().toString());
      continue;
    }
    try {
      Object value=ClassUtils.getValeByType(keMap.get(fileItem).getField().getType(),object);
      keMap.get(fileItem).setValue(value);
      if (disconfCenterFile.getObject() != null) {
        keMap.get(fileItem).getField().set(disconfCenterFile.getObject(),keMap.get(fileItem).getValue());
      }
    }
 catch (    Exception e) {
      LOGGER.error("String_Node_Str" + fileName + "String_Node_Str"+ e.toString(),e);
    }
  }
}
Program: 60703
Project: 60703
Buggy source:
/** 
 */
@Override public void inject2Instance(Object object,String fileName){
  DisconfCenterFile disconfCenterFile=DisconfCenterStore.getInstance().getConfFileMap().get(fileName);
  if (disconfCenterFile == null) {
    LOGGER.error("String_Node_Str" + fileName + "String_Node_Str");
    return;
  }
  if (object != null) {
    disconfCenterFile.setObject(object);
  }
  Map<String,FileItemValue> keMap=disconfCenterFile.getKeyMaps();
  for (  String fileItem : keMap.keySet()) {
    try {
      if (object == null) {
        if (Modifier.isStatic(keMap.get(fileItem).getField().getModifiers())) {
          LOGGER.debug(fileItem + "String_Node_Str");
          keMap.get(fileItem).getField().set(null,keMap.get(fileItem).getValue());
        }
      }
 else {
        LOGGER.debug(fileItem + "String_Node_Str");
        Object defaultValue=keMap.get(fileItem).getField().get(object);
        if (keMap.get(fileItem).getValue() == null) {
          keMap.get(fileItem).getField().set(object,defaultValue);
          keMap.get(fileItem).setValue(defaultValue);
        }
 else {
          keMap.get(fileItem).getField().set(object,keMap.get(fileItem).getValue());
        }
      }
    }
 catch (    Exception e) {
      LOGGER.error(e.toString(),e);
    }
  }
}

Fixed version (ground truth):
/** 
 */
@Override public void inject2Instance(Object object,String fileName){
  DisconfCenterFile disconfCenterFile=DisconfCenterStore.getInstance().getConfFileMap().get(fileName);
  if (disconfCenterFile == null) {
    LOGGER.error("String_Node_Str" + fileName + "String_Node_Str");
    return;
  }
  if (object != null) {
    disconfCenterFile.setObject(object);
  }
  Map<String,FileItemValue> keMap=disconfCenterFile.getKeyMaps();
  for (  String fileItem : keMap.keySet()) {
    try {
      if (object == null) {
        if (Modifier.isStatic(keMap.get(fileItem).getField().getModifiers())) {
          LOGGER.debug(fileItem + "String_Node_Str");
          keMap.get(fileItem).getField().set(null,keMap.get(fileItem).getValue());
        }
      }
 else {
        LOGGER.debug(fileItem + "String_Node_Str");
        Object defaultValue=keMap.get(fileItem).getField().get(object);
        if (keMap.get(fileItem).getValue() == null) {
          keMap.get(fileItem).getField().set(object,defaultValue);
          keMap.get(fileItem).setValue(defaultValue);
        }
 else {
          keMap.get(fileItem).getField().set(object,keMap.get(fileItem).getValue());
        }
      }
    }
 catch (    Exception e) {
      LOGGER.error("String_Node_Str" + fileName + "String_Node_Str"+ e.toString(),e);
    }
  }
}
Program: 60704
Project: 60704
Buggy source:
/** 
 */
@Override public void inject2Store(String key,DisconfValue disconfValue){
  DisconfCenterItem disconfCenterItem=DisconfCenterStore.getInstance().getConfItemMap().get(key);
  if (disconfCenterItem == null) {
    LOGGER.error("String_Node_Str" + key + "String_Node_Str");
    return;
  }
  if (disconfValue == null || disconfValue.getValue() == null) {
    LOGGER.error("String_Node_Str",key);
    return;
  }
  Class<?> typeClass=disconfCenterItem.getField().getType();
  try {
    Object newValue=ClassUtils.getValeByType(typeClass,disconfValue.getValue());
    disconfCenterItem.setValue(newValue);
    if (disconfCenterItem.getObject() != null) {
      disconfCenterItem.getField().set(disconfCenterItem.getObject(),disconfCenterItem.getValue());
    }
  }
 catch (  Exception e) {
    LOGGER.error(e.toString(),e);
    return;
  }
}

Fixed version (ground truth):
/** 
 */
@Override public void inject2Store(String key,DisconfValue disconfValue){
  DisconfCenterItem disconfCenterItem=DisconfCenterStore.getInstance().getConfItemMap().get(key);
  if (disconfCenterItem == null) {
    LOGGER.error("String_Node_Str" + key + "String_Node_Str");
    return;
  }
  if (disconfValue == null || disconfValue.getValue() == null) {
    LOGGER.error("String_Node_Str",key);
    return;
  }
  Class<?> typeClass=disconfCenterItem.getField().getType();
  try {
    Object newValue=ClassUtils.getValeByType(typeClass,disconfValue.getValue());
    disconfCenterItem.setValue(newValue);
    if (disconfCenterItem.getObject() != null) {
      disconfCenterItem.getField().set(disconfCenterItem.getObject(),disconfCenterItem.getValue());
    }
  }
 catch (  Exception e) {
    LOGGER.error("String_Node_Str" + key + "String_Node_Str"+ e.toString(),e);
    return;
  }
}
Program: 60705
Project: 60705
Buggy source:
/** 
 */
@Override public void inject2Instance(Object object,String key){
  DisconfCenterItem disconfCenterItem=DisconfCenterStore.getInstance().getConfItemMap().get(key);
  if (disconfCenterItem == null) {
    LOGGER.error("String_Node_Str" + key + "String_Node_Str");
    return;
  }
  if (object != null) {
    disconfCenterItem.setObject(object);
  }
  try {
    if (object != null) {
      Object defaultValue=disconfCenterItem.getField().get(object);
      LOGGER.debug(disconfCenterItem.getKey() + "String_Node_Str");
      if (disconfCenterItem.getValue() == null) {
        disconfCenterItem.getField().set(object,defaultValue);
        disconfCenterItem.setValue(defaultValue);
      }
 else {
        disconfCenterItem.getField().set(object,disconfCenterItem.getValue());
      }
    }
 else {
      if (Modifier.isStatic(disconfCenterItem.getField().getModifiers())) {
        LOGGER.debug(disconfCenterItem.getKey() + "String_Node_Str");
        disconfCenterItem.getField().set(null,disconfCenterItem.getValue());
      }
    }
  }
 catch (  Exception e) {
    LOGGER.error(e.toString(),e);
    return;
  }
}

Fixed version (ground truth):
/** 
 */
@Override public void inject2Instance(Object object,String key){
  DisconfCenterItem disconfCenterItem=DisconfCenterStore.getInstance().getConfItemMap().get(key);
  if (disconfCenterItem == null) {
    LOGGER.error("String_Node_Str" + key + "String_Node_Str");
    return;
  }
  if (object != null) {
    disconfCenterItem.setObject(object);
  }
  try {
    if (object != null) {
      Object defaultValue=disconfCenterItem.getField().get(object);
      LOGGER.debug(disconfCenterItem.getKey() + "String_Node_Str");
      if (disconfCenterItem.getValue() == null) {
        disconfCenterItem.getField().set(object,defaultValue);
        disconfCenterItem.setValue(defaultValue);
      }
 else {
        disconfCenterItem.getField().set(object,disconfCenterItem.getValue());
      }
    }
 else {
      if (Modifier.isStatic(disconfCenterItem.getField().getModifiers())) {
        LOGGER.debug(disconfCenterItem.getKey() + "String_Node_Str");
        disconfCenterItem.getField().set(null,disconfCenterItem.getValue());
      }
    }
  }
 catch (  Exception e) {
    LOGGER.error("String_Node_Str" + key + "String_Node_Str"+ e.toString(),e);
    return;
  }
}
Program: 60706
Project: 60706
Buggy source:
/** 
 * 根据Field类型返回值
 * @param field
 */
public static Object getValeByType(Class<?> type,String value) throws Exception {
  String typeName=type.getName();
  typeName=typeName.toLowerCase();
  if (typeName.equals("String_Node_Str") || typeName.equals("String_Node_Str")) {
    if (value.equals("String_Node_Str")) {
      value="String_Node_Str";
    }
    return Integer.valueOf(value);
  }
 else   if (typeName.equals("String_Node_Str") || typeName.equals("String_Node_Str")) {
    if (value.equals("String_Node_Str")) {
      value="String_Node_Str";
    }
    return Long.valueOf(value);
  }
 else   if (typeName.equals("String_Node_Str") || typeName.equals("String_Node_Str")) {
    if (value.equals("String_Node_Str")) {
      value="String_Node_Str";
    }
    return Boolean.valueOf(value);
  }
 else   if (typeName.equals("String_Node_Str") || typeName.equals("String_Node_Str")) {
    if (value.equals("String_Node_Str")) {
      value="String_Node_Str";
    }
    return Double.valueOf(value);
  }
 else {
    return value;
  }
}

Fixed version (ground truth):
/** 
 * 根据Field类型返回值
 * @param field
 */
public static Object getValeByType(Class<?> type,Object value) throws Exception {
  if (!(value instanceof String)) {
    value="String_Node_Str";
  }
  String dataValue=(String)value;
  dataValue=dataValue.trim();
  String typeName=type.getName();
  typeName=typeName.toLowerCase();
  if (typeName.equals("String_Node_Str") || typeName.equals("String_Node_Str")) {
    if (value.equals("String_Node_Str")) {
      value="String_Node_Str";
    }
    return Integer.valueOf(dataValue);
  }
 else   if (typeName.equals("String_Node_Str") || typeName.equals("String_Node_Str")) {
    if (value.equals("String_Node_Str")) {
      value="String_Node_Str";
    }
    return Long.valueOf(dataValue);
  }
 else   if (typeName.equals("String_Node_Str") || typeName.equals("String_Node_Str")) {
    if (value.equals("String_Node_Str")) {
      value="String_Node_Str";
    }
    return Boolean.valueOf(dataValue);
  }
 else   if (typeName.equals("String_Node_Str") || typeName.equals("String_Node_Str")) {
    if (value.equals("String_Node_Str")) {
      value="String_Node_Str";
    }
    return Double.valueOf(dataValue);
  }
 else {
    return value;
  }
}
Program: 60707
Project: 60707
Buggy source:
@Override public String getUsageInfo(){
  List<String> hostInfoList=zooKeeperDriver.getConf(DISCONF_GROUPNAME);
  return StringUtils.join(hostInfoList,'\n');
}

Fixed version (ground truth):
@Override public String getUsageInfo(){
  List<String> hostInfoList=zooKeeperDriver.getConf(zooConfig.getZookeeperUrlPrefix());
  return StringUtils.join(hostInfoList,'\n');
}
Program: 60708
Project: 60708
Buggy source:
/** 
 * @Description : 使用TOMCAT方式来导入
 * @param propertyFilePath
 * @return void
 * @author liaoqiqi
 * @date 2013-6-19
 */
private static Properties loadWithTomcatMode(final String propertyFilePath) throws Exception {
  Properties props=new Properties();
  URL url=loader.getResource(propertyFilePath);
  URI uri=new URI(url.toString());
  props.load(new FileInputStream(uri.getPath()));
  return props;
}

Fixed version (ground truth):
/** 
 * @Description : 使用TOMCAT方式来导入
 * @param propertyFilePath
 * @return void
 * @author liaoqiqi
 * @date 2013-6-19
 */
private static Properties loadWithTomcatMode(final String propertyFilePath) throws Exception {
  Properties props=new Properties();
  try {
    URL url=loader.getResource(propertyFilePath);
    URI uri=new URI(url.toString());
    props.load(new FileInputStream(uri.getPath()));
  }
 catch (  Exception e) {
    props.load(loader.getResourceAsStream(propertyFilePath));
  }
  return props;
}
Program: 60709
Project: 60709
Buggy source:
/** 
 * 第一次扫描，静态扫描
 * @param scanPackage
 */
public synchronized static void firstScan(String scanPackage){
  if (isInit == true) {
    LOGGER.info("String_Node_Str");
    return;
  }
  LOGGER.info("String_Node_Str");
  try {
    ConfigMgr.init();
    if (DisClientConfig.getInstance().ENABLE_REMOTE_CONF == false) {
      LOGGER.info("String_Node_Str");
      return;
    }
    scanMgr=ScanFactory.getScanMgr();
    scanMgr.firstScan(scanPackage);
    disconfCoreMgr=DisconfCoreFactory.getDisconfCoreMgr();
    disconfCoreMgr.process();
    isInit=true;
  }
 catch (  Exception e) {
    LOGGER.error(e.toString(),e);
  }
}

Fixed version (ground truth):
/** 
 * 第一次扫描，静态扫描
 * @param scanPackage
 */
public synchronized static void firstScan(String scanPackage){
  if (isFirstInit == true) {
    LOGGER.info("String_Node_Str");
    return;
  }
  LOGGER.info("String_Node_Str");
  try {
    ConfigMgr.init();
    if (DisClientConfig.getInstance().ENABLE_REMOTE_CONF == false) {
      LOGGER.info("String_Node_Str");
      return;
    }
    scanMgr=ScanFactory.getScanMgr();
    scanMgr.firstScan(scanPackage);
    disconfCoreMgr=DisconfCoreFactory.getDisconfCoreMgr();
    disconfCoreMgr.process();
    isFirstInit=true;
  }
 catch (  Exception e) {
    LOGGER.error(e.toString(),e);
  }
}
Program: 60710
Project: 60710
Buggy source:
/** 
 * 第二次扫描, 动态扫描
 * @param scanPackage
 */
public synchronized static void secondScan(){
  if (isInit == false) {
    LOGGER.info("String_Node_Str");
    return;
  }
  LOGGER.info("String_Node_Str");
  try {
    scanMgr.secondScan();
    disconfCoreMgr.inject2DisconfInstance();
  }
 catch (  Exception e) {
    LOGGER.error(e.toString(),e);
  }
  LOGGER.info("String_Node_Str" + DisconfStoreProcessorFactory.getDisconfStoreFileProcessor().confToString());
  LOGGER.info("String_Node_Str" + DisconfStoreProcessorFactory.getDisconfStoreItemProcessor().confToString());
  LOGGER.info("String_Node_Str");
}

Fixed version (ground truth):
/** 
 * 第二次扫描, 动态扫描
 * @param scanPackage
 */
public synchronized static void secondScan(){
  if (isFirstInit == false) {
    LOGGER.info("String_Node_Str");
    return;
  }
  if (isSecondeInit == true) {
    LOGGER.info("String_Node_Str");
    return;
  }
  LOGGER.info("String_Node_Str");
  try {
    scanMgr.secondScan();
    disconfCoreMgr.inject2DisconfInstance();
  }
 catch (  Exception e) {
    LOGGER.error(e.toString(),e);
  }
  isSecondeInit=true;
  LOGGER.info("String_Node_Str" + DisconfStoreProcessorFactory.getDisconfStoreFileProcessor().confToString());
  LOGGER.info("String_Node_Str" + DisconfStoreProcessorFactory.getDisconfStoreItemProcessor().confToString());
  LOGGER.info("String_Node_Str");
}
Program: 60711
Project: 60711
Buggy source:
/** 
 * @Description : 总关闭
 * @return void
 * @author liaoqiqi
 * @date 2013-6-14
 */
public synchronized static void close(){
  try {
    LOGGER.info("String_Node_Str");
    disconfCoreMgr.release();
    isInit=false;
  }
 catch (  Exception e) {
    LOGGER.error("String_Node_Str",e);
  }
}

Fixed version (ground truth):
/** 
 * @Description : 总关闭
 * @return void
 * @author liaoqiqi
 * @date 2013-6-14
 */
public synchronized static void close(){
  try {
    LOGGER.info("String_Node_Str");
    disconfCoreMgr.release();
    isFirstInit=false;
    isSecondeInit=false;
  }
 catch (  Exception e) {
    LOGGER.error("String_Node_Str",e);
  }
}
Program: 60712
Project: 60712
Buggy source:
/** 
 */
@Override public void inject2Store(String fileName,DisconfValue disconfValue){
  DisconfCenterFile disconfCenterFile=DisconfCenterStore.getInstance().getConfFileMap().get(fileName);
  if (disconfCenterFile == null) {
    LOGGER.error("String_Node_Str" + fileName + "String_Node_Str");
    return;
  }
  if (disconfValue == null || disconfValue.getProperties() == null) {
    LOGGER.error("String_Node_Str",fileName);
    return;
  }
  Map<String,FileItemValue> keMap=disconfCenterFile.getKeyMaps();
  for (  String fileItem : keMap.keySet()) {
    Object object=disconfValue.getProperties().get(fileItem);
    if (object == null) {
      continue;
    }
    try {
      Object value=ClassUtils.getValeByType(keMap.get(fileItem).getField().getType(),(String)object);
      keMap.get(fileItem).setValue(value);
      if (disconfCenterFile.getObject() != null) {
        keMap.get(fileItem).getField().set(disconfCenterFile.getObject(),keMap.get(fileItem).getValue());
      }
    }
 catch (    Exception e) {
      LOGGER.error(e.toString(),e);
    }
  }
}

Fixed version (ground truth):
/** 
 */
@Override public void inject2Store(String fileName,DisconfValue disconfValue){
  DisconfCenterFile disconfCenterFile=DisconfCenterStore.getInstance().getConfFileMap().get(fileName);
  if (disconfCenterFile == null) {
    LOGGER.error("String_Node_Str" + fileName + "String_Node_Str");
    return;
  }
  if (disconfValue == null || disconfValue.getProperties() == null) {
    LOGGER.error("String_Node_Str",fileName);
    return;
  }
  Map<String,FileItemValue> keMap=disconfCenterFile.getKeyMaps();
  for (  String fileItem : keMap.keySet()) {
    Object object=disconfValue.getProperties().get(fileItem);
    if (object == null) {
      LOGGER.error("String_Node_Str",fileItem,disconfValue.getProperties().toString());
      continue;
    }
    try {
      Object value=ClassUtils.getValeByType(keMap.get(fileItem).getField().getType(),(String)object);
      keMap.get(fileItem).setValue(value);
      if (disconfCenterFile.getObject() != null) {
        keMap.get(fileItem).getField().set(disconfCenterFile.getObject(),keMap.get(fileItem).getValue());
      }
    }
 catch (    Exception e) {
      LOGGER.error(e.toString(),e);
    }
  }
}
Program: 60713
Project: 60713
Buggy source:
/** 
 */
public int run(){
  try {
    while (true) {
      LOGGER.info("String_Node_Str" + baoBaoService.calcBaiFa());
      LOGGER.info("String_Node_Str" + baoBaoService.calcYuErBao());
      Thread.sleep(5000);
      LOGGER.info("String_Node_Str" + jedisConfig.getHost() + "String_Node_Str"+ jedisConfig.getPort()+ "String_Node_Str"+ REDIS_KEY+ "String_Node_Str"+ simpleRedisService.getKey(REDIS_KEY));
    }
  }
 catch (  Exception e) {
    LOGGER.error(e.toString(),e);
  }
  return 0;
}

Fixed version (ground truth):
/** 
 */
public int run(){
  try {
    while (true) {
      Thread.sleep(5000);
    }
  }
 catch (  Exception e) {
    LOGGER.error(e.toString(),e);
  }
  return 0;
}
Program: 60714
Project: 60714
Buggy source:
@Test public void demo(){
  new MockUp<DisconfCoreFactory>(){
    @Mock public DisconfCoreMgr getDisconfCoreMgr() throws Exception {
      FetcherMgr fetcherMgr=FetcherFactory.getFetcherMgr();
      final WatchMgr watchMgr=new WatchMgrMock().getMockInstance();
      watchMgr.init("String_Node_Str","String_Node_Str");
      DisconfCoreMgr disconfCoreMgr=new DisconfCoreMgrImpl(watchMgr,fetcherMgr);
      return disconfCoreMgr;
    }
  }
;
  try {
    LOGGER.info("String_Node_Str");
    LOGGER.info("String_Node_Str");
    LOGGER.info(String.valueOf("String_Node_Str" + confA.getVarA()));
    LOGGER.info(String.valueOf("String_Node_Str" + confA.getVarA2()));
    LOGGER.info(String.valueOf("String_Node_Str" + serviceA.getVarAA()));
    LOGGER.info("String_Node_Str");
    DisconfMgr.start(ScanPackTestCase.SCAN_PACK_NAME);
    LOGGER.info(DisconfStoreProcessorFactory.getDisconfStoreFileProcessor().confToString());
    LOGGER.info(DisconfStoreProcessorFactory.getDisconfStoreItemProcessor().confToString());
    LOGGER.info("String_Node_Str");
    LOGGER.info(String.valueOf("String_Node_Str" + confA.getVarA()));
    LOGGER.info(String.valueOf("String_Node_Str" + confA.getVarA2()));
    LOGGER.info(String.valueOf("String_Node_Str" + serviceA.getVarAA()));
    LOGGER.info("String_Node_Str");
  }
 catch (  Exception e) {
    e.printStackTrace();
    Assert.assertTrue(false);
  }
}

Fixed version (ground truth):
@Test public void demo(){
  new MockUp<DisconfCoreFactory>(){
    @Mock public DisconfCoreMgr getDisconfCoreMgr() throws Exception {
      FetcherMgr fetcherMgr=FetcherFactory.getFetcherMgr();
      final WatchMgr watchMgr=new WatchMgrMock().getMockInstance();
      watchMgr.init("String_Node_Str","String_Node_Str");
      DisconfCoreMgr disconfCoreMgr=new DisconfCoreMgrImpl(watchMgr,fetcherMgr);
      return disconfCoreMgr;
    }
  }
;
  try {
    LOGGER.info("String_Node_Str");
    LOGGER.info("String_Node_Str");
    LOGGER.info(String.valueOf("String_Node_Str" + confA.getVarA()));
    LOGGER.info(String.valueOf("String_Node_Str" + confA.getVarA2()));
    LOGGER.info(String.valueOf("String_Node_Str" + serviceA.getVarAA()));
    LOGGER.info("String_Node_Str");
    DisconfMgr.start(ScanPackTestCase.SCAN_PACK_NAME);
    LOGGER.info(DisconfStoreProcessorFactory.getDisconfStoreFileProcessor().confToString());
    LOGGER.info(DisconfStoreProcessorFactory.getDisconfStoreItemProcessor().confToString());
    LOGGER.info("String_Node_Str");
    LOGGER.info(String.valueOf("String_Node_Str" + confA.getVarA()));
    Assert.assertEquals(new Long(1000),confA.getVarA());
    LOGGER.info(String.valueOf("String_Node_Str" + confA.getVarA2()));
    Assert.assertEquals(new Long(2000),confA.getVarA2());
    LOGGER.info(String.valueOf("String_Node_Str" + serviceA.getVarAA()));
    Assert.assertEquals(new Integer(1000).intValue(),serviceA.getVarAA());
    LOGGER.info("String_Node_Str");
  }
 catch (  Exception e) {
    e.printStackTrace();
    Assert.assertTrue(false);
  }
}
Program: 60715
Project: 60715
Buggy source:
/** 
 * 将配置项数据注入到仓库
 */
public void injectItem2Store(String key,String value){
  DisconfCenterItem disconfCenterItem=disconfCenterStore.getConfItemMap().get(key);
  if (disconfCenterItem == null) {
    LOGGER.error("String_Node_Str" + key + "String_Node_Str");
    return;
  }
  Class<?> typeClass=disconfCenterItem.getField().getType();
  try {
    Object newValue=ClassUtils.getValeByType(typeClass,value);
    disconfCenterItem.setValue(newValue);
  }
 catch (  Exception e) {
    LOGGER.error(e.toString(),e);
    return;
  }
}

Fixed version (ground truth):
/** 
 * 将配置项数据注入到仓库
 */
public void injectItem2Store(String key,String value){
  DisconfCenterItem disconfCenterItem=disconfCenterStore.getConfItemMap().get(key);
  if (disconfCenterItem == null) {
    LOGGER.error("String_Node_Str" + key + "String_Node_Str");
    return;
  }
  Class<?> typeClass=disconfCenterItem.getField().getType();
  try {
    Object newValue=ClassUtils.getValeByType(typeClass,value);
    disconfCenterItem.setValue(newValue);
    if (disconfCenterItem.getObject() != null) {
      disconfCenterItem.getField().set(disconfCenterItem.getObject(),disconfCenterItem.getValue());
    }
  }
 catch (  Exception e) {
    LOGGER.error(e.toString(),e);
    return;
  }
}
Program: 60716
Project: 60716
Buggy source:
@Override public void onClick(View view){
  if (mButton.getVisibility() != View.VISIBLE) {
    return;
  }
  mCollapsed=!mCollapsed;
  mButton.setImageDrawable(mCollapsed ? mExpandDrawable : mCollapseDrawable);
  if (mCollapsedStatus != null) {
    mCollapsedStatus.put(mPosition,mCollapsed);
  }
  Animation animation;
  if (mCollapsed) {
    animation=new ExpandCollapseAnimation(this,getHeight(),mCollapsedHeight);
  }
 else {
    animation=new ExpandCollapseAnimation(this,getHeight(),getHeight() + mTextHeightWithMaxLines - mTv.getHeight());
  }
  animation.setFillAfter(true);
  animation.setAnimationListener(new Animation.AnimationListener(){
    @Override public void onAnimationStart(    Animation animation){
      applyAlphaAnimation(mTv,mAnimAlphaStart);
    }
    @Override public void onAnimationEnd(    Animation animation){
    }
    @Override public void onAnimationRepeat(    Animation animation){
    }
  }
);
  clearAnimation();
  startAnimation(animation);
}

Fixed version (ground truth):
@Override public void onClick(View view){
  if (mButton.getVisibility() != View.VISIBLE) {
    return;
  }
  mCollapsed=!mCollapsed;
  mButton.setImageDrawable(mCollapsed ? mExpandDrawable : mCollapseDrawable);
  if (mCollapsedStatus != null) {
    mCollapsedStatus.put(mPosition,mCollapsed);
  }
  Animation animation;
  if (mCollapsed) {
    animation=new ExpandCollapseAnimation(this,getHeight(),mCollapsedHeight);
  }
 else {
    animation=new ExpandCollapseAnimation(this,getHeight(),getHeight() + mTextHeightWithMaxLines - mTv.getHeight());
  }
  animation.setFillAfter(true);
  animation.setAnimationListener(new Animation.AnimationListener(){
    @Override public void onAnimationStart(    Animation animation){
      applyAlphaAnimation(mTv,mAnimAlphaStart);
    }
    @Override public void onAnimationEnd(    Animation animation){
      clearAnimation();
    }
    @Override public void onAnimationRepeat(    Animation animation){
    }
  }
);
  clearAnimation();
  startAnimation(animation);
}
Program: 60717
Project: 60717
Buggy source:
@Override public void onAnimationEnd(Animation animation){
}

Fixed version (ground truth):
@Override public void onAnimationEnd(Animation animation){
  clearAnimation();
}