nus-yam/ex-repair huggingface dataset:
Program: 59496
Project: 59496
Buggy source:
public void initialize() throws WBIOException {
  log.log(Level.INFO,"String_Node_Str");
  configuration=wbFreeMarkerFactory.createConfiguration();
  configuration.setDefaultEncoding("String_Node_Str");
  configuration.setOutputEncoding("String_Node_Str");
  templateLoader=wbFreeMarkerFactory.createWBFreeMarkerTemplateLoader(cacheInstances);
  cloudFileStorage=WBCloudFileStorageFactory.getInstance();
  configuration.setLocalizedLookup(false);
  configuration.setTemplateLoader(templateLoader);
  WBFreeMarkerModuleDirective moduleDirective=wbFreeMarkerFactory.createWBFreeMarkerModuleDirective();
  moduleDirective.initialize(this,cacheInstances);
  configuration.setSharedVariable(ModelBuilder.MODULE_DIRECTIVE,moduleDirective);
  WBFreeMarkerImageDirective imageDirective=wbFreeMarkerFactory.createWBFreeMarkerImageDirective();
  imageDirective.initialize(blobHandler,cacheInstances);
  configuration.setSharedVariable(ModelBuilder.IMAGE_DIRECTIVE,imageDirective);
  WBFreeMarkerArticleDirective articleDirective=wbFreeMarkerFactory.createWBFreeMarkerArticleDirective();
  articleDirective.initialize(this,cacheInstances);
  configuration.setSharedVariable(ModelBuilder.ARTICLE_DIRECTIVE,articleDirective);
}

Fixed version (ground truth):
public void initialize() throws WBIOException {
  log.log(Level.INFO,"String_Node_Str");
  configuration=wbFreeMarkerFactory.createConfiguration();
  configuration.setDefaultEncoding("String_Node_Str");
  configuration.setOutputEncoding("String_Node_Str");
  templateLoader=wbFreeMarkerFactory.createWBFreeMarkerTemplateLoader(cacheInstances);
  cloudFileStorage=WBCloudFileStorageFactory.getInstance();
  configuration.setLocalizedLookup(false);
  configuration.setTemplateLoader(templateLoader);
  WBFreeMarkerModuleDirective moduleDirective=wbFreeMarkerFactory.createWBFreeMarkerModuleDirective();
  moduleDirective.initialize(this,cacheInstances);
  configuration.setSharedVariable(ModelBuilder.MODULE_DIRECTIVE,moduleDirective);
  WBFreeMarkerImageDirective imageDirective=wbFreeMarkerFactory.createWBFreeMarkerImageDirective();
  imageDirective.initialize(cloudFileStorage,cacheInstances);
  configuration.setSharedVariable(ModelBuilder.IMAGE_DIRECTIVE,imageDirective);
  WBFreeMarkerArticleDirective articleDirective=wbFreeMarkerFactory.createWBFreeMarkerArticleDirective();
  articleDirective.initialize(this,cacheInstances);
  configuration.setSharedVariable(ModelBuilder.ARTICLE_DIRECTIVE,articleDirective);
}
Program: 59497
Project: 59497
Buggy source:
@Before public void setUp(){
  cacheFactoryMock=PowerMock.createMock(WBCacheFactory.class);
  freeMarkerFactoryMock=PowerMock.createMock(WBFreeMarkerFactory.class);
  configurationMock=PowerMock.createMock(Configuration.class);
  templateLoaderMock=PowerMock.createMock(WBFreeMarkerTemplateLoader.class);
  moduleDirectiveMock=PowerMock.createMock(WBFreeMarkerModuleDirective.class);
  imageDirectiveMock=PowerMock.createMock(WBFreeMarkerImageDirective.class);
  articleDirectiveMock=PowerMock.createMock(WBFreeMarkerArticleDirective.class);
  blobHandlerMock=PowerMock.createMock(WBBlobHandler.class);
  messageCacheMock=PowerMock.createMock(WBMessagesCache.class);
  cacheInstancesMock=PowerMock.createMock(WBCacheInstances.class);
  Logger loggerMock=PowerMock.createMock(Logger.class);
  Whitebox.setInternalState(WBFreeMarkerTemplateEngine.class,loggerMock);
}

Fixed version (ground truth):
@Before public void setUp(){
  cacheFactoryMock=PowerMock.createMock(WBCacheFactory.class);
  freeMarkerFactoryMock=PowerMock.createMock(WBFreeMarkerFactory.class);
  configurationMock=PowerMock.createMock(Configuration.class);
  templateLoaderMock=PowerMock.createMock(WBFreeMarkerTemplateLoader.class);
  moduleDirectiveMock=PowerMock.createMock(WBFreeMarkerModuleDirective.class);
  imageDirectiveMock=PowerMock.createMock(WBFreeMarkerImageDirective.class);
  articleDirectiveMock=PowerMock.createMock(WBFreeMarkerArticleDirective.class);
  cloudStorageMock=PowerMock.createMock(WBCloudFileStorage.class);
  messageCacheMock=PowerMock.createMock(WBMessagesCache.class);
  cacheInstancesMock=PowerMock.createMock(WBCacheInstances.class);
  Logger loggerMock=PowerMock.createMock(Logger.class);
  Whitebox.setInternalState(WBFreeMarkerTemplateEngine.class,loggerMock);
}
Program: 59499
Project: 59499
Buggy source:
public static LocaleManager getInstance(){
  if (localeManager == null) {
    localeManager=new LocaleManager();
    try {
      localeManager.loadLocalesfromFile(LANGUAGES_CONFIG_FILE);
    }
 catch (    WBIOException e) {
      localeManager=null;
      e.printStackTrace();
      return null;
    }
  }
  return localeManager;
}

Fixed version (ground truth):
public static LocaleManager getInstance(){
  if (localeManager == null) {
    localeManager=new LocaleManager();
    try {
      localeManager.loadLocalesfromFile(LANGUAGES_CONFIG_FILE);
    }
 catch (    WBIOException e) {
      localeManager=null;
      return null;
    }
  }
  return localeManager;
}
Program: 59500
Project: 59500
Buggy source:
private Object copyResultSetToObject(ResultSet resultSet,Class kind) throws SQLException, WBSerializerException {
  try {
    Object result=kind.newInstance();
    Field[] fields=kind.getDeclaredFields();
    for (    Field field : fields) {
      field.setAccessible(true);
      boolean storeField=(field.getAnnotation(AdminFieldKey.class) != null) || (field.getAnnotation(AdminFieldStore.class) != null) || (field.getAnnotation(AdminFieldTextStore.class) != null);
      if (storeField) {
        String fieldName=field.getName();
        String fieldNameUpperCase=field.getName().toUpperCase();
        PropertyDescriptor pd=new PropertyDescriptor(fieldName,kind);
        if (field.getType() == Long.class) {
          Long value=resultSet.getLong(fieldNameUpperCase);
          pd.getWriteMethod().invoke(result,value);
        }
 else         if (field.getType() == String.class) {
          String value=resultSet.getString(fieldNameUpperCase);
          pd.getWriteMethod().invoke(result,value);
        }
 else         if (field.getType() == Integer.class) {
          Integer value=resultSet.getInt(fieldNameUpperCase);
          pd.getWriteMethod().invoke(result,value);
        }
      }
    }
    return result;
  }
 catch (  Exception e) {
    throw new WBSerializerException("String_Node_Str",e);
  }
}

Fixed version (ground truth):
private Object copyResultSetToObject(ResultSet resultSet,Class kind) throws SQLException, WBSerializerException {
  try {
    Object result=kind.newInstance();
    Field[] fields=kind.getDeclaredFields();
    for (    Field field : fields) {
      field.setAccessible(true);
      boolean storeField=(field.getAnnotation(AdminFieldKey.class) != null) || (field.getAnnotation(AdminFieldStore.class) != null) || (field.getAnnotation(AdminFieldTextStore.class) != null);
      if (storeField) {
        String fieldName=field.getName();
        String fieldNameUpperCase=field.getName().toUpperCase();
        PropertyDescriptor pd=new PropertyDescriptor(fieldName,kind);
        if (field.getType() == Long.class) {
          Long value=resultSet.getLong(fieldNameUpperCase);
          pd.getWriteMethod().invoke(result,value);
        }
 else         if (field.getType() == String.class) {
          String value=resultSet.getString(fieldNameUpperCase);
          pd.getWriteMethod().invoke(result,value);
        }
 else         if (field.getType() == Integer.class) {
          Integer value=resultSet.getInt(fieldNameUpperCase);
          pd.getWriteMethod().invoke(result,value);
        }
 else         if (field.getType() == Date.class) {
          Timestamp ts=resultSet.getTimestamp(fieldNameUpperCase);
          Date value=new Date(ts.getTime());
          pd.getWriteMethod().invoke(result,value);
        }
      }
    }
    return result;
  }
 catch (  Exception e) {
    throw new WBSerializerException("String_Node_Str",e);
  }
}
Program: 59502
Project: 59502
Buggy source:
public static LocaleManager getInstance(){
  LocaleManager localeManager=new LocaleManager();
  try {
    localeManager.loadLocalesfromFile(LANGUAGES_CONFIG_FILE);
  }
 catch (  WBIOException e) {
    return null;
  }
  return localeManager;
}

Fixed version (ground truth):
public static LocaleManager getInstance(){
  if (localeManager == null) {
    localeManager=new LocaleManager();
    try {
      localeManager.loadLocalesfromFile(LANGUAGES_CONFIG_FILE);
    }
 catch (    WBIOException e) {
      localeManager=null;
      e.printStackTrace();
      return null;
    }
  }
  return localeManager;
}
Program: 59503
Project: 59503
Buggy source:
public WBFileControllerEx(){
  httpServletToolbox=new HttpServletToolbox();
  jsonObjectConverter=new WBJSONToFromObjectConverter();
  adminStorage=AdminDataStorageFactory.getInstance();
  blobHandler=new WBGaeBlobHandler();
  validator=new WBFileValidator();
  cloudFileStorage=WBCloudFileStorageFactory.getInstance();
  WBCacheFactory wbCacheFactory=new DefaultWBCacheFactory();
  imageCache=wbCacheFactory.createWBImagesCacheInstance();
  adminStorage.addStorageListener(this);
}

Fixed version (ground truth):
public WBFileControllerEx(){
  httpServletToolbox=new HttpServletToolbox();
  jsonObjectConverter=new WBJSONToFromObjectConverter();
  adminStorage=AdminDataStorageFactory.getInstance();
  validator=new WBFileValidator();
  cloudFileStorage=WBCloudFileStorageFactory.getInstance();
  WBCacheFactory wbCacheFactory=new DefaultWBCacheFactory();
  imageCache=wbCacheFactory.createWBImagesCacheInstance();
  adminStorage.addStorageListener(this);
}
Program: 59504
Project: 59504
Buggy source:
private WBProject getProject() throws WBIOException {
  WBProject project=adminStorage.get(WBProject.PROJECT_KEY,WBProject.class);
  if (null == project) {
    project=new WBProject();
    project.setKey("String_Node_Str");
    project.setDefaultLanguage("String_Node_Str");
    project.setSupportedLanguages("String_Node_Str");
    project=adminStorage.add(project);
  }
  return project;
}

Fixed version (ground truth):
private WBProject getProject() throws WBIOException {
  WBProject project=adminStorage.get(WBProject.PROJECT_KEY,WBProject.class);
  if (null == project) {
    project=new WBProject();
    project.setKey("String_Node_Str");
    project.setDefaultLanguage("String_Node_Str");
    project.setLastModified(Calendar.getInstance(TimeZone.getTimeZone("String_Node_Str")).getTime());
    project.setSupportedLanguages("String_Node_Str");
    project=adminStorage.addWithKey(project);
  }
  return project;
}
Program: 59505
Project: 59505
Buggy source:
public WBReadOnlyDataController(){
  httpServletToolbox=new HttpServletToolbox();
  jsonObjectConverter=new WBJSONToFromObjectConverter();
  adminStorage=new GaeAdminDataStorage();
}

Fixed version (ground truth):
public WBReadOnlyDataController(){
  httpServletToolbox=new HttpServletToolbox();
  jsonObjectConverter=new WBJSONToFromObjectConverter();
  adminStorage=AdminDataStorageFactory.getInstance();
}
Program: 59507
Project: 59507
Buggy source:
@Test public void test_getIstance_OK(){
  try {
    LocaleManager manager=LocaleManager.getInstance();
    assertTrue(manager.getSupportedLanguages() != null);
  }
 catch (  Exception e) {
    assertTrue(false);
  }
}

Fixed version (ground truth):
@Test public void test_getIstance_OK(){
  try {
    LocaleManager manager=LocaleManager.getInstance();
    assertTrue(manager.getSupportedLanguages() != null);
  }
 catch (  Exception e) {
    e.printStackTrace();
    assertTrue(false);
  }
}
Program: 59508
Project: 59508
Buggy source:
@Test public void test_getInstance_fail(){
  try {
    String path="String_Node_Str";
    Whitebox.setInternalState(LocaleManager.class,"String_Node_Str",path);
    LocaleManager manager=LocaleManager.getInstance();
    assertTrue(manager == null);
  }
 catch (  Exception e) {
    assertTrue(false);
  }
}

Fixed version (ground truth):
@Test public void test_getInstance_fail(){
  try {
    String path="String_Node_Str";
    Whitebox.setInternalState(LocaleManager.class,"String_Node_Str",path);
    Whitebox.setInternalState(LocaleManager.class,"String_Node_Str",(LocaleManager)null);
    LocaleManager manager=LocaleManager.getInstance();
    assertTrue(manager == null);
  }
 catch (  Exception e) {
    assertTrue(false);
  }
}
Program: 59509
Project: 59509
Buggy source:
public String buildPageContent(HttpServletRequest request,URLMatcherResult urlMatcherResult,WBWebPage wbWebPage,WBProject project) throws WBException {
  if (wbWebPage.getIsTemplateSource() == 0) {
    return wbWebPage.getHtmlSource();
  }
  Map<String,Object> pageModel=getPageModel(request,urlMatcherResult,wbWebPage,project);
  String result="String_Node_Str";
  try {
    StringWriter out=new StringWriter();
    templateEngine.process(WBTemplateEngine.WEBPAGES_PATH_PREFIX + wbWebPage.getName(),pageModel,out);
    result+=out.toString();
  }
 catch (  IOException e) {
    log.log(Level.SEVERE,"String_Node_Str",e);
    throw new WBContentException("String_Node_Str" + urlMatcherResult.getUrlRequest());
  }
  return result;
}

Fixed version (ground truth):
public String buildPageContent(HttpServletRequest request,URLMatcherResult urlMatcherResult,WBWebPage wbWebPage,WBProject project) throws WBException {
  if ((wbWebPage.getIsTemplateSource() == null) || (wbWebPage.getIsTemplateSource() == 0)) {
    return wbWebPage.getHtmlSource();
  }
  Map<String,Object> pageModel=getPageModel(request,urlMatcherResult,wbWebPage,project);
  String result="String_Node_Str";
  try {
    StringWriter out=new StringWriter();
    templateEngine.process(WBTemplateEngine.WEBPAGES_PATH_PREFIX + wbWebPage.getName(),pageModel,out);
    result+=out.toString();
  }
 catch (  IOException e) {
    log.log(Level.SEVERE,"String_Node_Str",e);
    throw new WBContentException("String_Node_Str" + urlMatcherResult.getUrlRequest());
  }
  return result;
}
Program: 59510
Project: 59510
Buggy source:
public WBArticleController(){
  httpServletToolbox=new HttpServletToolbox();
  jsonObjectConverter=new WBJSONToFromObjectConverter();
  adminStorage=new GaeAdminDataStorage();
  validator=new WBArticleValidator();
  WBCacheFactory wbCacheFactory=new DefaultWBCacheFactory();
  wbArticleCache=wbCacheFactory.createWBArticlesCacheInstance();
}

Fixed version (ground truth):
public WBArticleController(){
  httpServletToolbox=new HttpServletToolbox();
  jsonObjectConverter=new WBJSONToFromObjectConverter();
  adminStorage=new GaeAdminDataStorage();
  validator=new WBArticleValidator();
  WBCacheFactory wbCacheFactory=new DefaultWBCacheFactory();
  wbArticleCache=wbCacheFactory.createWBArticlesCacheInstance();
  adminStorage.addStorageListener(this);
}
Program: 59512
Project: 59512
Buggy source:
public int getInt(String widgetSize,int defaultVal);

Fixed version (ground truth):
int getInt(String widgetSize,int defaultVal);
Program: 59513
Project: 59513
Buggy source:
public Storage putFloat(String key,Float value);

Fixed version (ground truth):
Storage putFloat(String key,Float value);
Program: 59514
Project: 59514
Buggy source:
public Storage putInt(String key,int value);

Fixed version (ground truth):
Storage putInt(String key,int value);
Program: 59515
Project: 59515
Buggy source:
public Storage putString(String key,String value);

Fixed version (ground truth):
Storage putString(String key,String value);
Program: 59516
Project: 59516
Buggy source:
public boolean getBoolean(String large_font,boolean defaultVal);

Fixed version (ground truth):
boolean getBoolean(String large_font,boolean defaultVal);
Program: 59517
Project: 59517
Buggy source:
public String getString(String key,String defaultVal);

Fixed version (ground truth):
String getString(String key,String defaultVal);
Program: 59518
Project: 59518
Buggy source:
public Storage putLong(String key,Long value);

Fixed version (ground truth):
Storage putLong(String key,Long value);
Program: 59519
Project: 59519
Buggy source:
public Storage putBoolean(String key,Boolean value);

Fixed version (ground truth):
Storage putBoolean(String key,Boolean value);
Program: 59523
Project: 59523
Buggy source:
public HashMap<String,StockQuote> getQuotes(Cache cache,List<String> symbols){
  HashMap<String,StockQuote> quotes=new HashMap<>();
  JSONArray jsonArray;
  JSONObject quoteJson;
  try {
    jsonArray=this.retrieveQuotesAsJson(cache,symbols);
    for (int i=0; i < jsonArray.length(); i++) {
      quoteJson=jsonArray.getJSONObject(i);
      StockQuote quote=new StockQuote(quoteJson.optString("String_Node_Str"),quoteJson.optString("String_Node_Str").replace("String_Node_Str","String_Node_Str"),quoteJson.optString("String_Node_Str"),quoteJson.optString("String_Node_Str"),quoteJson.optString("String_Node_Str").replace("String_Node_Str","String_Node_Str"),"String_Node_Str",quoteJson.optString("String_Node_Str"));
      quotes.put(quote.getSymbol(),quote);
    }
  }
 catch (  JSONException e) {
    return null;
  }
  return quotes;
}

Fixed version (ground truth):
public HashMap<String,StockQuote> getQuotes(Cache cache,List<String> symbols){
  HashMap<String,StockQuote> quotes=new HashMap<>();
  JSONArray jsonArray;
  JSONObject quoteJson;
  try {
    jsonArray=this.retrieveQuotesAsJson(cache,symbols);
    for (int i=0; i < jsonArray.length(); i++) {
      quoteJson=jsonArray.getJSONObject(i);
      StockQuote quote=new StockQuote(quoteJson.optString("String_Node_Str"),quoteJson.optString("String_Node_Str").replace("String_Node_Str","String_Node_Str"),quoteJson.optString("String_Node_Str"),quoteJson.optString("String_Node_Str"),quoteJson.optString("String_Node_Str").replace("String_Node_Str","String_Node_Str"),"String_Node_Str",quoteJson.optString("String_Node_Str"),Locale.US);
      quotes.put(quote.getSymbol(),quote);
    }
  }
 catch (  JSONException e) {
    return null;
  }
  return quotes;
}
Program: 59524
Project: 59524
Buggy source:
public HashMap<String,StockQuote> getQuotes(Cache cache,List<String> symbols){
  HashMap<String,StockQuote> quotes=new HashMap<>();
  HashMap<String,String> fxChanges=this.fxChangeRepository.getChanges(cache,symbols);
  JSONArray jsonArray;
  JSONObject quoteJson;
  try {
    jsonArray=this.retrieveQuotesAsJson(cache,symbols);
    if (jsonArray != null) {
      for (int i=0; i < jsonArray.length(); i++) {
        quoteJson=jsonArray.getJSONObject(i);
        StockQuote quote=new StockQuote(quoteJson.optString("String_Node_Str"),quoteJson.optString("String_Node_Str"),quoteJson.optString("String_Node_Str"),quoteJson.optString("String_Node_Str"),quoteJson.optString("String_Node_Str"),quoteJson.optString("String_Node_Str"),quoteJson.optString("String_Node_Str"),fxChanges.get(quoteJson.optString("String_Node_Str")));
        quotes.put(quote.getSymbol(),quote);
      }
    }
  }
 catch (  JSONException e) {
    return null;
  }
  return quotes;
}

Fixed version (ground truth):
public HashMap<String,StockQuote> getQuotes(Cache cache,List<String> symbols){
  HashMap<String,StockQuote> quotes=new HashMap<>();
  HashMap<String,String> fxChanges=this.fxChangeRepository.getChanges(cache,symbols);
  JSONArray jsonArray;
  JSONObject quoteJson;
  try {
    jsonArray=this.retrieveQuotesAsJson(cache,symbols);
    if (jsonArray != null) {
      for (int i=0; i < jsonArray.length(); i++) {
        quoteJson=jsonArray.getJSONObject(i);
        StockQuote quote=new StockQuote(quoteJson.optString("String_Node_Str"),quoteJson.optString("String_Node_Str"),quoteJson.optString("String_Node_Str"),quoteJson.optString("String_Node_Str"),quoteJson.optString("String_Node_Str"),quoteJson.optString("String_Node_Str"),quoteJson.optString("String_Node_Str"),fxChanges.get(quoteJson.optString("String_Node_Str")),Locale.US);
        quotes.put(quote.getSymbol(),quote);
      }
    }
  }
 catch (  JSONException e) {
    return null;
  }
  return quotes;
}
Program: 59525
Project: 59525
Buggy source:
public List<Map<String,String>> getDisplayInfo(){
  NumberFormat numberFormat=NumberFormat.getInstance();
  List<Map<String,String>> info=new ArrayList<>();
  for (  String symbol : this.getSortedSymbols()) {
    StockQuote quote=this.stocksQuotes.get(symbol);
    PortfolioStock stock=this.getStock(symbol);
    Map<String,String> itemInfo=new HashMap<>();
    populateDisplayNames(quote,stock,itemInfo);
    String currentPrice=populateDisplayCurrentPrice(quote,itemInfo);
    if (hasInfoForStock(stock)) {
      String buyPrice=stock.getPrice();
      itemInfo.put("String_Node_Str",buyPrice);
      itemInfo.put("String_Node_Str",stock.getDate());
      populateDisplayHighLimit(stock,itemInfo);
      populateDisplayLowLimit(stock,itemInfo);
      itemInfo.put("String_Node_Str",stock.getQuantity());
      populateDisplayLastChange(numberFormat,symbol,quote,stock,itemInfo);
      populateDisplayTotalChange(numberFormat,symbol,stock,itemInfo,currentPrice,buyPrice);
      populateDisplayHoldingValue(numberFormat,symbol,stock,itemInfo,currentPrice);
    }
    itemInfo.put("String_Node_Str",symbol);
    info.add(itemInfo);
  }
  return info;
}

Fixed version (ground truth):
public List<Map<String,String>> getDisplayInfo(){
  NumberFormat numberFormat=NumberFormat.getInstance(Locale.getDefault());
  List<Map<String,String>> info=new ArrayList<>();
  for (  String symbol : this.getSortedSymbols()) {
    StockQuote quote=this.stocksQuotes.get(symbol);
    PortfolioStock stock=this.getStock(symbol);
    Map<String,String> itemInfo=new HashMap<>();
    populateDisplayNames(quote,stock,itemInfo);
    String currentPrice=populateDisplayCurrentPrice(quote,itemInfo);
    if (hasInfoForStock(stock)) {
      String buyPrice=stock.getPrice();
      itemInfo.put("String_Node_Str",buyPrice);
      itemInfo.put("String_Node_Str",stock.getDate());
      populateDisplayHighLimit(stock,itemInfo);
      populateDisplayLowLimit(stock,itemInfo);
      itemInfo.put("String_Node_Str",stock.getQuantity());
      populateDisplayLastChange(numberFormat,symbol,quote,stock,itemInfo);
      populateDisplayTotalChange(numberFormat,symbol,stock,itemInfo,currentPrice,buyPrice);
      populateDisplayHoldingValue(numberFormat,symbol,stock,itemInfo,currentPrice);
    }
    itemInfo.put("String_Node_Str",symbol);
    info.add(itemInfo);
  }
  return info;
}
Program: 59527
Project: 59527
Buggy source:
private HashMap<String,StockQuote> loadQuotes(){
  if (mCachedQuotes != null && !mCachedQuotes.isEmpty()) {
    return mCachedQuotes;
  }
  HashMap<String,StockQuote> quotes=new HashMap<>();
  String savedQuotesString=this.appStorage.getString("String_Node_Str","String_Node_Str");
  String timeStamp=this.appStorage.getString("String_Node_Str","String_Node_Str");
  if (!savedQuotesString.equals("String_Node_Str")) {
    JSONObject savedQuotes=new JSONObject();
    try {
      savedQuotes=new JSONObject(savedQuotesString);
    }
 catch (    JSONException ignored) {
    }
    try {
      String key;
      JSONObject details;
      for (Iterator iter=savedQuotes.keys(); iter.hasNext(); ) {
        key=(String)iter.next();
        details=savedQuotes.getJSONObject(key);
        quotes.put(key,new StockQuote(details.getString("String_Node_Str"),details.getString("String_Node_Str"),details.getString("String_Node_Str"),details.getString("String_Node_Str"),details.getString("String_Node_Str"),details.getString("String_Node_Str"),details.getString("String_Node_Str")));
      }
    }
 catch (    Exception e) {
      quotes=new HashMap<>();
    }
  }
  mCachedQuotes=quotes;
  mTimeStamp=timeStamp;
  return quotes;
}

Fixed version (ground truth):
private HashMap<String,StockQuote> loadQuotes(){
  if (mCachedQuotes != null && !mCachedQuotes.isEmpty()) {
    return mCachedQuotes;
  }
  HashMap<String,StockQuote> quotes=new HashMap<>();
  String savedQuotesString=this.appStorage.getString("String_Node_Str","String_Node_Str");
  String timeStamp=this.appStorage.getString("String_Node_Str","String_Node_Str");
  if (!savedQuotesString.equals("String_Node_Str")) {
    JSONObject savedQuotes=new JSONObject();
    try {
      savedQuotes=new JSONObject(savedQuotesString);
    }
 catch (    JSONException ignored) {
    }
    try {
      String key;
      JSONObject details;
      for (Iterator iter=savedQuotes.keys(); iter.hasNext(); ) {
        key=(String)iter.next();
        details=savedQuotes.getJSONObject(key);
        quotes.put(key,new StockQuote(details.getString("String_Node_Str"),details.getString("String_Node_Str"),details.getString("String_Node_Str"),details.getString("String_Node_Str"),details.getString("String_Node_Str"),details.getString("String_Node_Str"),details.getString("String_Node_Str"),Locale.getDefault()));
      }
    }
 catch (    Exception e) {
      quotes=new HashMap<>();
    }
  }
  mCachedQuotes=quotes;
  mTimeStamp=timeStamp;
  return quotes;
}
Program: 59529
Project: 59529
Buggy source:
@Override public Storage getStorage(){
  SharedPreferences widgetPreferences=null;
  try {
    widgetPreferences=context.getSharedPreferences(context.getString(R.string.prefs_name) + this.id,0);
  }
 catch (  Resources.NotFoundException ignored) {
  }
  return new PreferenceStorage(widgetPreferences);
}

Fixed version (ground truth):
@Override public Storage getStorage(){
  SharedPreferences widgetPreferences=null;
  try {
    widgetPreferences=context.getApplicationContext().getSharedPreferences(context.getString(R.string.prefs_name) + this.id,0);
  }
 catch (  Resources.NotFoundException ignored) {
  }
  return new PreferenceStorage(widgetPreferences);
}
Program: 59530
Project: 59530
Buggy source:
public HashMap<String,String> getChanges(Cache cache,List<String> symbols){
  HashMap<String,String> changes=new HashMap<>();
  if (!this.hasFxSymbols(symbols)) {
    return changes;
  }
  try {
    JSONObject jsonChanges=retrieveChangesAsJson(cache);
    String symbol;
    for (Iterator<String> iter=jsonChanges.keys(); iter.hasNext(); ) {
      symbol=iter.next();
      changes.put(symbol,jsonChanges.getString(symbol));
    }
  }
 catch (  JSONException e) {
    return null;
  }
  return changes;
}

Fixed version (ground truth):
public HashMap<String,String> getChanges(Cache cache,List<String> symbols){
  HashMap<String,String> changes=new HashMap<>();
  if (!this.hasFxSymbols(symbols)) {
    return changes;
  }
  try {
    JSONObject jsonChanges=retrieveChangesAsJson(cache);
    String symbol;
    for (Iterator<String> iter=jsonChanges.keys(); iter.hasNext(); ) {
      symbol=iter.next();
      changes.put(symbol,jsonChanges.getString(symbol));
    }
  }
 catch (  JSONException e) {
  }
  return changes;
}
Program: 59531
Project: 59531
Buggy source:
@Override public void delWidget(int oldId){
  List<Integer> ids=this.getIds();
  if (!ids.contains(oldId)) {
    return;
  }
  ids.remove(oldId);
  this.setIds(ids);
}

Fixed version (ground truth):
@Override public void delWidget(int oldId){
  List<Integer> ids=this.getIds();
  if (!ids.contains(oldId)) {
    return;
  }
  ids.remove((Integer)oldId);
  this.setIds(ids);
}
Program: 59534
Project: 59534
Buggy source:
public AndroidWidget(Context context,int id){
  this.context=context;
  this.storage=this.getStorage();
  this.id=id;
}

Fixed version (ground truth):
public AndroidWidget(Context context,int id){
  this.context=context;
  this.id=id;
  this.storage=this.getStorage();
}
Program: 59535
Project: 59535
Buggy source:
@Override public Widget addWidget(int id,int size){
  Widget widget=getWidget(id);
  widget.setSize(size);
  widget.setStock1("String_Node_Str");
  widget.setStock1Summary("String_Node_Str");
  widget.save();
  return widget;
}

Fixed version (ground truth):
@Override public Widget addWidget(int id,int size){
  Widget widget=getWidget(id);
  if (this.getIds().contains(id)) {
    return widget;
  }
  this.addWidgetId(id);
  widget.setSize(size);
  widget.setStock1("String_Node_Str");
  widget.setStock1Summary("String_Node_Str");
  widget.save();
  return widget;
}
Program: 59536
Project: 59536
Buggy source:
@Override public Object call() throws Exception {
  portfolioRepository.updateStock();
  refreshView();
  return new Object();
}

Fixed version (ground truth):
@Override public Object call() throws Exception {
  portfolioRepository.updateStock(mStockSymbol);
  refreshView();
  return new Object();
}
Program: 59537
Project: 59537
Buggy source:
@Override public boolean onContextItemSelected(MenuItem item){
  if (item.getItemId() == 1) {
    Callable callable=new Callable(){
      @Override public Object call() throws Exception {
        portfolioRepository.updateStock();
        refreshView();
        return new Object();
      }
    }
;
    DialogTools.alertWithCallback(this,"String_Node_Str","String_Node_Str" + mStockSymbol + "String_Node_Str","String_Node_Str","String_Node_Str",callable,null);
  }
 else   if (item.getItemId() == 0) {
    AdapterContextMenuInfo menuInfo=((AdapterView.AdapterContextMenuInfo)item.getMenuInfo());
    showPortfolioItemEdit(mPortfolioListView,menuInfo.position);
  }
  return super.onContextItemSelected(item);
}

Fixed version (ground truth):
@Override public boolean onContextItemSelected(MenuItem item){
  if (item.getItemId() == 1) {
    Callable callable=new Callable(){
      @Override public Object call() throws Exception {
        portfolioRepository.updateStock(mStockSymbol);
        refreshView();
        return new Object();
      }
    }
;
    DialogTools.alertWithCallback(this,"String_Node_Str","String_Node_Str" + mStockSymbol + "String_Node_Str","String_Node_Str","String_Node_Str",callable,null);
  }
 else   if (item.getItemId() == 0) {
    AdapterContextMenuInfo menuInfo=((AdapterView.AdapterContextMenuInfo)item.getMenuInfo());
    showPortfolioItemEdit(mPortfolioListView,menuInfo.position);
  }
  return super.onContextItemSelected(item);
}
Program: 59539
Project: 59539
Buggy source:
public WidgetView(Context context,int appWidgetId,UpdateType updateMode,HashMap<String,StockQuote> quotes,String quotesTimeStamp){
  WidgetRepository widgetRepository=new AndroidWidgetRepository(context);
  this.context=context;
  this.widget=widgetRepository.getWidget(appWidgetId);
  this.quotes=quotes;
  this.quotesTimeStamp=quotesTimeStamp;
  this.updateMode=updateMode;
  this.symbols=widget.getSymbols();
  this.portfolioStocks=new PortfolioStockRepository(PreferenceStorage.getInstance(context),new PreferenceCache(context),widgetRepository).getStocksForSymbols(symbols);
  this.hasPortfolioData=portfolioStocks.isEmpty();
  this.remoteViews=this.getBlankRemoteViews(this.widget,context.getPackageName());
  this.enabledViews=this.calculateEnabledViews(this.widget);
}

Fixed version (ground truth):
public WidgetView(Context context,int appWidgetId,UpdateType updateMode,HashMap<String,StockQuote> quotes,String quotesTimeStamp){
  WidgetRepository widgetRepository=new AndroidWidgetRepository(context);
  this.context=context;
  this.widget=widgetRepository.getWidget(appWidgetId);
  this.quotes=quotes;
  this.quotesTimeStamp=quotesTimeStamp;
  this.updateMode=updateMode;
  this.symbols=widget.getSymbols();
  this.portfolioStocks=new PortfolioStockRepository(PreferenceStorage.getInstance(context),new PreferenceCache(context),widgetRepository).getStocksForSymbols(symbols);
  this.hasPortfolioData=!portfolioStocks.isEmpty();
  this.remoteViews=this.getBlankRemoteViews(this.widget,context.getPackageName());
  this.enabledViews=this.calculateEnabledViews(this.widget);
}
Program: 59540
Project: 59540
Buggy source:
public void updateStock(){
  this.updateStock("String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str");
}

Fixed version (ground truth):
public void updateStock(String symbol){
  this.updateStock(symbol,"String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str");
}
Program: 59542
Project: 59542
Buggy source:
public String serialize(){
  return String.format("String_Node_Str",symbol,price,change,percent,exchange,volume,name);
}

Fixed version (ground truth):
public String serialize(){
  return String.format("String_Node_Str",this.symbol != null ? this.symbol : "String_Node_Str",this.price != null ? this.price : "String_Node_Str",this.change != null ? this.symbol : "String_Node_Str",this.percent != null ? this.percent : "String_Node_Str",this.exchange != null ? this.exchange : "String_Node_Str",this.volume != null ? this.volume : "String_Node_Str",this.name != null ? this.name : "String_Node_Str");
}
Program: 59544
Project: 59544
Buggy source:
public HashMap<String,StockQuote> getLiveQuotes(List<String> symbols){
  HashMap<String,StockQuote> allQuotes=new HashMap<>();
  List<String> yahooSymbols=new ArrayList<>(symbols);
  List<String> googleSymbols=new ArrayList<>(symbols);
  yahooSymbols.removeAll(GOOGLE_SYMBOLS);
  googleSymbols.retainAll(GOOGLE_SYMBOLS);
  HashMap<String,StockQuote> yahooQuotes=this.yahooRepository.getQuotes(this.appCache,yahooSymbols);
  HashMap<String,StockQuote> googleQuotes=this.googleRepository.getQuotes(this.appCache,googleSymbols);
  if (yahooQuotes != null)   allQuotes.putAll(yahooQuotes);
  if (googleQuotes != null)   allQuotes.putAll(googleQuotes);
  return allQuotes;
}

Fixed version (ground truth):
public HashMap<String,StockQuote> getLiveQuotes(List<String> symbols){
  HashMap<String,StockQuote> allQuotes=new HashMap<>();
  symbols=this.convertRequestSymbols(symbols);
  List<String> yahooSymbols=new ArrayList<>(symbols);
  List<String> googleSymbols=new ArrayList<>(symbols);
  yahooSymbols.removeAll(GOOGLE_SYMBOLS);
  googleSymbols.retainAll(GOOGLE_SYMBOLS);
  HashMap<String,StockQuote> yahooQuotes=this.yahooRepository.getQuotes(this.appCache,yahooSymbols);
  HashMap<String,StockQuote> googleQuotes=this.googleRepository.getQuotes(this.appCache,googleSymbols);
  if (yahooQuotes != null)   allQuotes.putAll(yahooQuotes);
  if (googleQuotes != null)   allQuotes.putAll(googleQuotes);
  allQuotes=this.convertResponseQuotes(allQuotes);
  return allQuotes;
}
Program: 59545
Project: 59545
Buggy source:
public HashMap<String,StockQuote> getQuotes(List<String> symbols,boolean noCache){
  HashMap<String,StockQuote> quotes=new HashMap<>();
  if (noCache) {
    Set<String> widgetSymbols=this.widgetRepository.getWidgetsStockSymbols();
    widgetSymbols.add("String_Node_Str");
    widgetSymbols.addAll(new PortfolioStockRepository(this.appStorage,this.appCache,this.widgetRepository).getStocks().keySet());
    quotes=getLiveQuotes(symbols);
  }
  if (quotes.isEmpty()) {
    quotes=loadQuotes();
  }
 else {
    SimpleDateFormat format=new SimpleDateFormat("String_Node_Str");
    String timeStamp=format.format(new Date()).toUpperCase();
    saveQuotes(quotes,timeStamp);
  }
  quotes.keySet().retainAll(symbols);
  return quotes;
}

Fixed version (ground truth):
public HashMap<String,StockQuote> getQuotes(List<String> symbols,boolean noCache){
  HashMap<String,StockQuote> quotes=new HashMap<>();
  if (noCache) {
    Set<String> widgetSymbols=this.widgetRepository.getWidgetsStockSymbols();
    widgetSymbols.add("String_Node_Str");
    widgetSymbols.addAll(new PortfolioStockRepository(this.appStorage,this.appCache,this.widgetRepository).getStocks().keySet());
    quotes=getLiveQuotes(new ArrayList<>(widgetSymbols));
  }
  if (quotes.isEmpty()) {
    quotes=loadQuotes();
  }
 else {
    SimpleDateFormat format=new SimpleDateFormat("String_Node_Str");
    String timeStamp=format.format(new Date()).toUpperCase();
    saveQuotes(quotes,timeStamp);
  }
  @SuppressWarnings("String_Node_Str") HashMap<String,StockQuote> filteredQuotes=(HashMap<String,StockQuote>)quotes.clone();
  filteredQuotes.keySet().retainAll(symbols);
  return filteredQuotes;
}
Program: 59546
Project: 59546
Buggy source:
public void setUp(){
  this.stockRepository=new StockQuoteRepository(new MockStorage(),new MockCache(),new MockWidgetRepository());
}

Fixed version (ground truth):
public void setUp(){
  MockWidgetRepository mockWidgetRepository=new MockWidgetRepository();
  mockWidgetRepository.setWidgetsStockSymbols(new HashSet<>(Arrays.asList("String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str")));
  this.stockRepository=new StockQuoteRepository(new MockStorage(),new MockCache(),mockWidgetRepository);
}
Program: 59547
Project: 59547
Buggy source:
@Override public Set<String> getWidgetsStockSymbols(){
  return new HashSet<>();
}

Fixed version (ground truth):
@Override public Set<String> getWidgetsStockSymbols(){
  if (this.widgetsStockSymbols != null) {
    return this.widgetsStockSymbols;
  }
  return new HashSet<>();
}
Program: 59549
Project: 59549
Buggy source:
public String timestamp(double millis){
  Calendar c=Calendar.getInstance();
  c.setTimeInMillis((long)millis);
  return X_String.toTimestamp(c.get(Calendar.YEAR),c.get(Calendar.MONTH),c.get(Calendar.DATE),c.get(Calendar.HOUR),c.get(Calendar.MINUTE),c.get(Calendar.MILLISECOND),c.getTimeZone().getOffset(c.getTimeInMillis()) / 60000);
}

Fixed version (ground truth):
public String timestamp(double millis){
  Calendar c=Calendar.getInstance();
  c.setTimeInMillis((long)millis);
  return X_String.toTimestamp(c.get(Calendar.YEAR),c.get(Calendar.MONTH) + 1,c.get(Calendar.DATE),c.get(Calendar.HOUR_OF_DAY),c.get(Calendar.MINUTE),c.get(Calendar.MILLISECOND),c.getTimeZone().getOffset(c.getTimeInMillis()) / 60000);
}
Program: 59550
Project: 59550
Buggy source:
public ModelSerializerDefault(final ClassTo<PrimitiveReader> primitiveReaders){
  this.primitiveReaders=primitiveReaders;
  collectionFactories=X_Collect.newClassMap(Class.class.cast(ConvertsTwoValues.class));
}

Fixed version (ground truth):
public ModelSerializerDefault(final ClassTo<PrimitiveReader> primitiveReaders){
  this.primitiveReaders=primitiveReaders;
  collectionFactories=X_Collect.newClassMap(ConvertsTwoValues.class);
}
Program: 59553
Project: 59553
Buggy source:
@Override public void run(){
  final RemovalHandler handler=scope.get();
  String fileResult;
  try {
    for (    final File file : files) {
      fileResult=X_IO.toStringUtf8(new FileInputStream(file));
      final Class<? extends Model> type=typeNameToClass.get(file.getParent());
      final Model model=deserialize(type,new StringCharIterator(fileResult));
      result.addModel(model);
    }
    callback.onSuccess(result);
  }
 catch (  final Exception e) {
    X_Log.error(getClass(),"String_Node_Str" + query);
    if (callback instanceof ErrorHandler) {
      ((ErrorHandler)callback).onError(new RuntimeException("String_Node_Str" + query));
    }
 else {
      rethrow(e);
    }
  }
 finally {
    handler.remove();
  }
}

Fixed version (ground truth):
@Override public void run(){
  final RemovalHandler handler=scope.get();
  String fileResult;
  try {
    for (    final File file : files) {
      fileResult=X_IO.toStringUtf8(new FileInputStream(file));
      final Class<? extends Model> type=typeNameToClass.get(file.getParent());
      final Model model=deserialize(type,new StringCharIterator(fileResult));
      result.addModel(model);
    }
    callback.onSuccess(result);
  }
 catch (  final Exception e) {
    X_Log.error(ModelServiceJre.class,"String_Node_Str" + query);
    if (callback instanceof ErrorHandler) {
      ((ErrorHandler)callback).onError(new RuntimeException("String_Node_Str" + query));
    }
 else {
      rethrow(e);
    }
  }
 finally {
    handler.remove();
  }
}
Program: 59554
Project: 59554
Buggy source:
@SuppressWarnings({"String_Node_Str","String_Node_Str"}) public File getRoot(final SuccessHandler<?> callback){
  try {
    return getFilesystemRoot();
  }
 catch (  final IOException e) {
    X_Log.error(getClass(),"String_Node_Str",e);
    if (callback instanceof ErrorHandler) {
      ((ErrorHandler)callback).onError(e);
    }
    return null;
  }
}

Fixed version (ground truth):
@SuppressWarnings({"String_Node_Str","String_Node_Str"}) public File getRoot(final SuccessHandler<?> callback){
  try {
    return getFilesystemRoot();
  }
 catch (  final IOException e) {
    X_Log.error(ModelServiceJre.class,"String_Node_Str",e);
    if (callback instanceof ErrorHandler) {
      ((ErrorHandler)callback).onError(e);
    }
    return null;
  }
}
Program: 59555
Project: 59555
Buggy source:
public Node transformUnary(Expression source,UnaryExpr expr){
  final Expression data=expr.getExpr();
switch (expr.getOperator()) {
case posDecrement:
case posIncrement:
    String compute=generateComputeMethod(data) + "String_Node_Str";
  List<Parameter> params=new ArrayList<>();
Type type=new UnknownType();
VariableDeclaratorId id=new VariableDeclaratorId("String_Node_Str");
params.add(new Parameter(type,id));
UnaryExpr copy=new UnaryExpr(new NameExpr("String_Node_Str"),expr.getOperator());
Statement body=new ExpressionStmt(copy);
LambdaExpr lambda=new LambdaExpr(params,body,false);
MethodCallExpr methodCall=new MethodCallExpr();
methodCall.setName(compute);
methodCall.setArgs(Arrays.asList(lambda));
initExtras(methodCall,data);
return methodCall;
case preIncrement:
case preDecrement:
final String setter=generateSetterMethod(data);
final String getter=generateGetterMethod(data);
methodCall=new MethodCallExpr();
methodCall.setName(setter);
MethodCallExpr get=new MethodCallExpr();
get.setName(getter);
final BinaryExpr.Operator operator=expr.getOperator() == Operator.preIncrement ? BinaryExpr.Operator.plus : BinaryExpr.Operator.minus;
BinaryExpr op=new BinaryExpr(get,new IntegerLiteralExpr("String_Node_Str"),operator);
methodCall.setArgs(Arrays.asList(op));
initExtras(methodCall,data);
return methodCall;
case inverse:
case negative:
case not:
case positive:
throw new NotImplemented("String_Node_Str" + expr.getOperator() + "String_Node_Str"+ getClass());
}
return expr;
}

Fixed version (ground truth):
public Node transformUnary(Expression source,UnaryExpr expr){
  final Expression data=expr.getExpr();
switch (expr.getOperator()) {
case posIncrement:
case posDecrement:
    final String setter=generateSetterMethod(data);
  final String getter=generateGetterMethod(data);
MethodCallExpr methodCall=new MethodCallExpr();
methodCall.setName(setter);
MethodCallExpr get=new MethodCallExpr();
get.setName(getter);
final BinaryExpr.Operator operator=expr.getOperator() == Operator.posIncrement ? BinaryExpr.Operator.plus : BinaryExpr.Operator.minus;
BinaryExpr op=new BinaryExpr(get,new IntegerLiteralExpr("String_Node_Str"),operator);
methodCall.setArgs(Arrays.asList(op));
initExtras(methodCall,data);
return methodCall;
case preIncrement:
case preDecrement:
String compute=generateComputeMethod(data) + "String_Node_Str";
List<Parameter> params=new ArrayList<>();
Type type=new UnknownType();
VariableDeclaratorId id=new VariableDeclaratorId("String_Node_Str");
params.add(new Parameter(type,id));
UnaryExpr copy=new UnaryExpr(new NameExpr("String_Node_Str"),expr.getOperator());
Statement body=new ExpressionStmt(copy);
LambdaExpr lambda=new LambdaExpr(params,body,false);
methodCall=new MethodCallExpr();
methodCall.setName(compute);
methodCall.setArgs(Arrays.asList(lambda));
initExtras(methodCall,data);
return methodCall;
case inverse:
case negative:
case not:
case positive:
throw new NotImplemented("String_Node_Str" + expr.getOperator() + "String_Node_Str"+ getClass());
}
return expr;
}
Program: 59556
Project: 59556
Buggy source:
public void await(double time,TimeUnit unit){
  X_Log.warn("String_Node_Str");
}

Fixed version (ground truth):
public void await(double time,TimeUnit unit){
  gwtLogger.log(Level.WARNING,"String_Node_Str");
}
Program: 59557
Project: 59557
Buggy source:
public CountdownLatch(int count){
  this.count=count;
}

Fixed version (ground truth):
public CountdownLatch(int count){
  this.count=count;
  gwtLogger=Logger.getLogger("String_Node_Str");
}
Program: 59559
Project: 59559
Buggy source:
@Override public T execute() throws ODataProducerException {
  String path=Enumerable.create(getSegments()).join("String_Node_Str");
  ODataClientRequest request=ODataClientRequest.get(getServiceRootUri() + path);
  if (select != null) {
    request=request.queryParam("String_Node_Str",select);
  }
  if (expand != null) {
    request=request.queryParam("String_Node_Str",expand);
  }
  ODataClientResponse response=getClient().getEntity(request);
  if (response == null)   return null;
  EdmEntitySet entitySet=getMetadata().getEdmEntitySet(getSegments().get(0).segment);
  for (  EntitySegment segment : getSegments().subList(1,getSegments().size())) {
    EdmNavigationProperty navProperty=entitySet.getType().findNavigationProperty(segment.segment);
    entitySet=getMetadata().getEdmEntitySet(navProperty.getToRole().getType());
  }
  OEntityKey key=Enumerable.create(getSegments()).last().key;
  FormatParser<Feed> parser=FormatParserFactory.getParser(Feed.class,getClient().getFormatType(),new Settings(ODataConstants.DATA_SERVICE_VERSION,getMetadata(),entitySet.getName(),key));
  Entry entry=Enumerable.create(parser.parse(getClient().getFeedReader(response)).getEntries()).firstOrNull();
  response.close();
  return (T)InternalUtil.toEntity(entityType,entry.getEntity());
}

Fixed version (ground truth):
@Override public T execute() throws ODataProducerException {
  String path=Enumerable.create(getSegments()).join("String_Node_Str");
  ODataClientRequest request=ODataClientRequest.get(getServiceRootUri() + path);
  if (select != null) {
    request=request.queryParam("String_Node_Str",select);
  }
  if (expand != null) {
    request=request.queryParam("String_Node_Str",expand);
  }
  EdmEntitySet entitySet=getMetadata().getEdmEntitySet(getSegments().get(0).segment);
  for (  EntitySegment segment : getSegments().subList(1,getSegments().size())) {
    EdmNavigationProperty navProperty=entitySet.getType().findNavigationProperty(segment.segment);
    if (navProperty != null) {
      entitySet=getMetadata().getEdmEntitySet(navProperty.getToRole().getType());
    }
  }
  ODataClientResponse response=getClient().getEntity(request);
  if (response == null)   return null;
  OEntityKey key=Enumerable.create(getSegments()).last().key;
  FormatParser<Feed> parser=FormatParserFactory.getParser(Feed.class,getClient().getFormatType(),new Settings(ODataConstants.DATA_SERVICE_VERSION,getMetadata(),entitySet.getName(),key));
  Entry entry=Enumerable.create(parser.parse(getClient().getFeedReader(response)).getEntries()).firstOrNull();
  response.close();
  return (T)InternalUtil.toEntity(entityType,entry.getEntity());
}
Program: 59560
Project: 59560
Buggy source:
@Override public OError parse(Reader reader){
  String code=null;
  String message=null;
  String innerError=null;
  XMLEventReader2 xmlReader=InternalUtil.newXMLEventReader(reader);
  XMLEvent2 event=xmlReader.nextEvent();
  while (!event.isStartElement())   event=xmlReader.nextEvent();
  if (!isStartElement(event,ERROR))   throw new RuntimeException("String_Node_Str" + ERROR.getLocalPart() + "String_Node_Str");
  while (!isEndElement(event=xmlReader.nextEvent(),ERROR)) {
    if (isStartElement(event,CODE))     code=xmlReader.getElementText();
 else     if (isStartElement(event,MESSAGE))     message=xmlReader.getElementText();
 else     if (isStartElement(event,INNER_ERROR))     innerError=xmlReader.getElementText();
 else     if (!event.isStartElement() || !event.isEndElement())     continue;
 else     throw new RuntimeException("String_Node_Str");
  }
  if (!isEndElement(event,ERROR))   throw new RuntimeException("String_Node_Str" + ERROR.getLocalPart() + "String_Node_Str");
  if (code == null && message == null && innerError == null)   throw new RuntimeException("String_Node_Str");
  return OErrors.error(code,message,innerError);
}

Fixed version (ground truth):
@Override public OError parse(Reader reader){
  String code=null;
  String message=null;
  String innerError=null;
  XMLEventReader2 xmlReader=StaxUtil.newXMLEventReader(reader);
  XMLEvent2 event=xmlReader.nextEvent();
  while (!event.isStartElement())   event=xmlReader.nextEvent();
  if (!isStartElement(event,ERROR))   throw new RuntimeException("String_Node_Str" + ERROR.getLocalPart() + "String_Node_Str");
  while (!isEndElement(event=xmlReader.nextEvent(),ERROR)) {
    if (isStartElement(event,CODE))     code=xmlReader.getElementText();
 else     if (isStartElement(event,MESSAGE))     message=xmlReader.getElementText();
 else     if (isStartElement(event,INNER_ERROR))     innerError=StaxUtil.innerXml(event,xmlReader);
 else     if (!event.isStartElement() || !event.isEndElement())     continue;
 else     throw new RuntimeException("String_Node_Str");
  }
  if (!isEndElement(event,ERROR))   throw new RuntimeException("String_Node_Str" + ERROR.getLocalPart() + "String_Node_Str");
  if (code == null && message == null && innerError == null)   throw new RuntimeException("String_Node_Str");
  return OErrors.error(code,message,innerError);
}