nus-yam/ex-repair huggingface dataset:
Program: 116947
Project: 116947
Buggy source:
protected void setUp() throws Exception {
  super.setUp();
  Properties prop=super.getTestProperties();
  assertNotNull(prop);
  System.out.println("String_Node_Str" + (String)prop.get("String_Node_Str"));
  this.setMode("String_Node_Str");
  if (skipTests(this.getMode())) {
    System.out.println(getClass().getName() + "String_Node_Str");
    return;
  }
 else {
    GeoMysqlAdapterTest.setGeoMySqlAdapter(new GeoMysqlAdapter((String)prop.get("String_Node_Str"),(new Integer((String)prop.get("String_Node_Str"))).intValue(),(String)prop.get("String_Node_Str"),(String)prop.get("String_Node_Str"),(String)prop.get("String_Node_Str")));
    connected=geoMySqlAdapter.initializeAdapter();
    assertTrue(connected);
    URL schema_url=getClass().getClassLoader().getResource("String_Node_Str");
    super.setSchemaJsonString(super.readSchemaFromFile(schema_url));
  }
}

Fixed version (ground truth):
protected void setUp() throws Exception {
  super.setUp();
  Properties prop=super.getTestProperties();
  assertNotNull(prop);
  System.out.println("String_Node_Str" + (String)prop.get("String_Node_Str"));
  if (skipTests(this.getMode())) {
    System.out.println(getClass().getName() + "String_Node_Str");
    return;
  }
 else {
    GeoMysqlAdapterTest.setGeoMySqlAdapter(new GeoMysqlAdapter((String)prop.get("String_Node_Str"),(new Integer((String)prop.get("String_Node_Str"))).intValue(),(String)prop.get("String_Node_Str"),(String)prop.get("String_Node_Str"),(String)prop.get("String_Node_Str")));
    connected=geoMySqlAdapter.initializeAdapter();
    assertTrue(connected);
    URL schema_url=getClass().getClassLoader().getResource("String_Node_Str");
    super.setSchemaJsonString(super.readSchemaFromFile(schema_url));
  }
}
Program: 116950
Project: 116950
Buggy source:
public void declareOutputFields(OutputFieldsDeclarer declarer){
  declarer.declareStream("String_Node_Str",new Fields("String_Node_Str"));
  declarer.declareStream("String_Node_Str",new Fields("String_Node_Str","String_Node_Str"));
  declarer.declareStream("String_Node_Str",new Fields("String_Node_Str","String_Node_Str","String_Node_Str"));
  declarer.declareStream("String_Node_Str",new Fields("String_Node_Str"));
}

Fixed version (ground truth):
public void declareOutputFields(OutputFieldsDeclarer declarer){
  declarer.declareStream("String_Node_Str",new Fields("String_Node_Str","String_Node_Str"));
  declarer.declareStream("String_Node_Str",new Fields("String_Node_Str","String_Node_Str"));
  declarer.declareStream("String_Node_Str",new Fields("String_Node_Str","String_Node_Str","String_Node_Str"));
  declarer.declareStream("String_Node_Str",new Fields("String_Node_Str"));
}
Program: 116953
Project: 116953
Buggy source:
public void declareOutputFields(OutputFieldsDeclarer declearer){
  declearer.declare(new Fields(this.OutputFieldName));
  declearer.declareStream("String_Node_Str",new Fields("String_Node_Str"));
  declearer.declareStream("String_Node_Str",new Fields("String_Node_Str"));
}

Fixed version (ground truth):
public void declareOutputFields(OutputFieldsDeclarer declearer){
  declearer.declareStream("String_Node_Str",new Fields("String_Node_Str","String_Node_Str"));
  declearer.declareStream("String_Node_Str",new Fields("String_Node_Str"));
  declearer.declareStream("String_Node_Str",new Fields("String_Node_Str"));
}
Program: 116956
Project: 116956
Buggy source:
public void declareOutputFields(OutputFieldsDeclarer declearer){
  declearer.declare(new Fields("String_Node_Str"));
  declearer.declareStream("String_Node_Str",new Fields("String_Node_Str"));
}

Fixed version (ground truth):
public void declareOutputFields(OutputFieldsDeclarer declearer){
  declearer.declareStream("String_Node_Str",new Fields("String_Node_Str","String_Node_Str"));
  declearer.declareStream("String_Node_Str",new Fields("String_Node_Str"));
}
Program: 116958
Project: 116958
Buggy source:
public void execute(Tuple tuple){
  JSONObject message=null;
  try {
    LOG.trace("String_Node_Str" + message);
    message=(JSONObject)tuple.getValue(0);
    if (message == null || message.isEmpty())     throw new Exception("String_Node_Str");
    int result_code=_adapter.bulkIndex(message);
    if (result_code == 0) {
      tuple_queue.add(tuple);
    }
 else     if (result_code == 1) {
      tuple_queue.add(tuple);
      Iterator<Tuple> iterator=tuple_queue.iterator();
      while (iterator.hasNext()) {
        Tuple setElement=iterator.next();
        _collector.ack(setElement);
        ackCounter.inc();
      }
      tuple_queue.clear();
    }
 else     if (result_code == 2) {
      throw new Exception("String_Node_Str");
    }
  }
 catch (  Exception e) {
    e.printStackTrace();
    Iterator<Tuple> iterator=tuple_queue.iterator();
    while (iterator.hasNext()) {
      Tuple setElement=iterator.next();
      _collector.fail(setElement);
      failCounter.inc();
      String error_as_string=org.apache.commons.lang.exception.ExceptionUtils.getStackTrace(e);
      JSONObject error=ErrorGenerator.generateErrorMessage(new String("String_Node_Str"),error_as_string);
      _collector.emit("String_Node_Str",new Values(error));
    }
    tuple_queue.clear();
  }
}

Fixed version (ground truth):
public void execute(Tuple tuple){
  JSONObject message=null;
  try {
    LOG.trace("String_Node_Str" + message);
    message=(JSONObject)tuple.getValueByField("String_Node_Str");
    if (message == null || message.isEmpty())     throw new Exception("String_Node_Str");
    int result_code=_adapter.bulkIndex(message);
    if (result_code == 0) {
      tuple_queue.add(tuple);
    }
 else     if (result_code == 1) {
      tuple_queue.add(tuple);
      Iterator<Tuple> iterator=tuple_queue.iterator();
      while (iterator.hasNext()) {
        Tuple setElement=iterator.next();
        _collector.ack(setElement);
        ackCounter.inc();
      }
      tuple_queue.clear();
    }
 else     if (result_code == 2) {
      throw new Exception("String_Node_Str");
    }
  }
 catch (  Exception e) {
    e.printStackTrace();
    Iterator<Tuple> iterator=tuple_queue.iterator();
    while (iterator.hasNext()) {
      Tuple setElement=iterator.next();
      _collector.fail(setElement);
      failCounter.inc();
      String error_as_string=org.apache.commons.lang.exception.ExceptionUtils.getStackTrace(e);
      JSONObject error=ErrorGenerator.generateErrorMessage(new String("String_Node_Str"),error_as_string);
      _collector.emit("String_Node_Str",new Values(error));
    }
    tuple_queue.clear();
  }
}
Program: 116959
Project: 116959
Buggy source:
/** 
 * @param parser  The parser class for parsing the incoming raw message byte stream
 * @return      Instance of this class
 */
public boolean checkForSchemaCorrectness(JSONObject message){
  int correct=0;
  if (message.containsKey("String_Node_Str")) {
    correct++;
    LOG.trace("String_Node_Str");
  }
  if (message.containsKey("String_Node_Str")) {
    correct++;
    LOG.trace("String_Node_Str");
  }
  if (message.containsKey("String_Node_Str")) {
    correct++;
    LOG.trace("String_Node_Str");
  }
  if (message.containsKey("String_Node_Str")) {
    correct++;
    LOG.trace("String_Node_Str");
  }
  if (message.containsKey("String_Node_Str")) {
    correct++;
    LOG.trace("String_Node_Str");
  }
  if (correct == 0) {
    LOG.trace("String_Node_Str" + message);
    return false;
  }
 else {
    LOG.trace("String_Node_Str" + message);
    return true;
  }
}

Fixed version (ground truth):
/** 
 * @param parser The parser class for parsing the incoming raw message byte stream
 * @return Instance of this class
 */
public boolean checkForSchemaCorrectness(JSONObject message){
  int correct=0;
  if (message.containsKey("String_Node_Str")) {
    correct++;
    LOG.trace("String_Node_Str");
  }
  if (message.containsKey("String_Node_Str")) {
    correct++;
    LOG.trace("String_Node_Str");
  }
  if (message.containsKey("String_Node_Str")) {
    correct++;
    LOG.trace("String_Node_Str");
  }
  if (message.containsKey("String_Node_Str")) {
    correct++;
    LOG.trace("String_Node_Str");
  }
  if (message.containsKey("String_Node_Str")) {
    correct++;
    LOG.trace("String_Node_Str");
  }
  if (correct == 0) {
    LOG.trace("String_Node_Str" + message);
    return false;
  }
 else {
    LOG.trace("String_Node_Str" + message);
    return true;
  }
}
Program: 116960
Project: 116960
Buggy source:
public void declareOutputFields(OutputFieldsDeclarer declearer){
  declearer.declare(new Fields(this.OutputFieldName));
  declearer.declareStream("String_Node_Str",new Fields(this.OutputFieldName));
}

Fixed version (ground truth):
public void declareOutputFields(OutputFieldsDeclarer declearer){
  declearer.declareStream("String_Node_Str",new Fields("String_Node_Str","String_Node_Str"));
  declearer.declareStream("String_Node_Str",new Fields("String_Node_Str"));
}
Program: 116962
Project: 116962
Buggy source:
public void declareOutputFields(OutputFieldsDeclarer declearer){
  declearer.declare(new Fields(this.OutputFieldName));
  declearer.declareStream("String_Node_Str",new Fields("String_Node_Str"));
  declearer.declareStream("String_Node_Str",new Fields("String_Node_Str"));
}

Fixed version (ground truth):
public void declareOutputFields(OutputFieldsDeclarer declearer){
  declearer.declareStream("String_Node_Str",new Fields("String_Node_Str","String_Node_Str"));
  declearer.declareStream("String_Node_Str",new Fields("String_Node_Str"));
  declearer.declareStream("String_Node_Str",new Fields("String_Node_Str"));
}
Program: 116965
Project: 116965
Buggy source:
public void declareOutputFields(OutputFieldsDeclarer declearer){
  declearer.declare(new Fields("String_Node_Str"));
  declearer.declareStream("String_Node_Str",new Fields("String_Node_Str"));
}

Fixed version (ground truth):
public void declareOutputFields(OutputFieldsDeclarer declearer){
  declearer.declareStream("String_Node_Str",new Fields("String_Node_Str","String_Node_Str"));
  declearer.declareStream("String_Node_Str",new Fields("String_Node_Str"));
}
Program: 116967
Project: 116967
Buggy source:
public void execute(Tuple tuple){
  JSONObject message=null;
  try {
    LOG.trace("String_Node_Str" + message);
    message=(JSONObject)tuple.getValue(0);
    if (message == null || message.isEmpty())     throw new Exception("String_Node_Str");
    int result_code=_adapter.bulkIndex(message);
    if (result_code == 0) {
      tuple_queue.add(tuple);
    }
 else     if (result_code == 1) {
      tuple_queue.add(tuple);
      Iterator<Tuple> iterator=tuple_queue.iterator();
      while (iterator.hasNext()) {
        Tuple setElement=iterator.next();
        _collector.ack(setElement);
        ackCounter.inc();
      }
      tuple_queue.clear();
    }
 else     if (result_code == 2) {
      throw new Exception("String_Node_Str");
    }
  }
 catch (  Exception e) {
    e.printStackTrace();
    Iterator<Tuple> iterator=tuple_queue.iterator();
    while (iterator.hasNext()) {
      Tuple setElement=iterator.next();
      _collector.fail(setElement);
      failCounter.inc();
      String error_as_string=org.apache.commons.lang.exception.ExceptionUtils.getStackTrace(e);
      JSONObject error=ErrorGenerator.generateErrorMessage(new String("String_Node_Str"),error_as_string);
      _collector.emit("String_Node_Str",new Values(error));
    }
    tuple_queue.clear();
  }
}

Fixed version (ground truth):
public void execute(Tuple tuple){
  JSONObject message=null;
  try {
    LOG.trace("String_Node_Str" + message);
    message=(JSONObject)tuple.getValueByField("String_Node_Str");
    if (message == null || message.isEmpty())     throw new Exception("String_Node_Str");
    int result_code=_adapter.bulkIndex(message);
    if (result_code == 0) {
      tuple_queue.add(tuple);
    }
 else     if (result_code == 1) {
      tuple_queue.add(tuple);
      Iterator<Tuple> iterator=tuple_queue.iterator();
      while (iterator.hasNext()) {
        Tuple setElement=iterator.next();
        _collector.ack(setElement);
        ackCounter.inc();
      }
      tuple_queue.clear();
    }
 else     if (result_code == 2) {
      throw new Exception("String_Node_Str");
    }
  }
 catch (  Exception e) {
    e.printStackTrace();
    Iterator<Tuple> iterator=tuple_queue.iterator();
    while (iterator.hasNext()) {
      Tuple setElement=iterator.next();
      _collector.fail(setElement);
      failCounter.inc();
      String error_as_string=org.apache.commons.lang.exception.ExceptionUtils.getStackTrace(e);
      JSONObject error=ErrorGenerator.generateErrorMessage(new String("String_Node_Str"),error_as_string);
      _collector.emit("String_Node_Str",new Values(error));
    }
    tuple_queue.clear();
  }
}
Program: 116968
Project: 116968
Buggy source:
/** 
 * @param parser  The parser class for parsing the incoming raw message byte stream
 * @return      Instance of this class
 */
public boolean checkForSchemaCorrectness(JSONObject message){
  int correct=0;
  if (message.containsKey("String_Node_Str")) {
    correct++;
    LOG.trace("String_Node_Str");
  }
  if (message.containsKey("String_Node_Str")) {
    correct++;
    LOG.trace("String_Node_Str");
  }
  if (message.containsKey("String_Node_Str")) {
    correct++;
    LOG.trace("String_Node_Str");
  }
  if (message.containsKey("String_Node_Str")) {
    correct++;
    LOG.trace("String_Node_Str");
  }
  if (message.containsKey("String_Node_Str")) {
    correct++;
    LOG.trace("String_Node_Str");
  }
  if (correct == 0) {
    LOG.trace("String_Node_Str" + message);
    return false;
  }
 else {
    LOG.trace("String_Node_Str" + message);
    return true;
  }
}

Fixed version (ground truth):
/** 
 * @param parser The parser class for parsing the incoming raw message byte stream
 * @return Instance of this class
 */
public boolean checkForSchemaCorrectness(JSONObject message){
  int correct=0;
  if (message.containsKey("String_Node_Str")) {
    correct++;
    LOG.trace("String_Node_Str");
  }
  if (message.containsKey("String_Node_Str")) {
    correct++;
    LOG.trace("String_Node_Str");
  }
  if (message.containsKey("String_Node_Str")) {
    correct++;
    LOG.trace("String_Node_Str");
  }
  if (message.containsKey("String_Node_Str")) {
    correct++;
    LOG.trace("String_Node_Str");
  }
  if (message.containsKey("String_Node_Str")) {
    correct++;
    LOG.trace("String_Node_Str");
  }
  if (correct == 0) {
    LOG.trace("String_Node_Str" + message);
    return false;
  }
 else {
    LOG.trace("String_Node_Str" + message);
    return true;
  }
}
Program: 116969
Project: 116969
Buggy source:
public void declareOutputFields(OutputFieldsDeclarer declearer){
  declearer.declare(new Fields(this.OutputFieldName));
  declearer.declareStream("String_Node_Str",new Fields(this.OutputFieldName));
}

Fixed version (ground truth):
public void declareOutputFields(OutputFieldsDeclarer declearer){
  declearer.declareStream("String_Node_Str",new Fields("String_Node_Str","String_Node_Str"));
  declearer.declareStream("String_Node_Str",new Fields("String_Node_Str"));
}
Program: 116973
Project: 116973
Buggy source:
public void declareOutputFields(OutputFieldsDeclarer declarer){
  declarer.declareStream("String_Node_Str",new Fields("String_Node_Str"));
  declarer.declareStream("String_Node_Str",new Fields("String_Node_Str","String_Node_Str"));
  declarer.declareStream("String_Node_Str",new Fields("String_Node_Str","String_Node_Str","String_Node_Str"));
  declarer.declareStream("String_Node_Str",new Fields("String_Node_Str"));
}

Fixed version (ground truth):
public void declareOutputFields(OutputFieldsDeclarer declarer){
  declarer.declareStream("String_Node_Str",new Fields("String_Node_Str","String_Node_Str"));
  declarer.declareStream("String_Node_Str",new Fields("String_Node_Str","String_Node_Str"));
  declarer.declareStream("String_Node_Str",new Fields("String_Node_Str","String_Node_Str","String_Node_Str"));
  declarer.declareStream("String_Node_Str",new Fields("String_Node_Str"));
}
Program: 116976
Project: 116976
Buggy source:
/** 
 * Return BroPaser JSON String
 */
public static String getBroJsonString(){
  return broJsonString;
}

Fixed version (ground truth):
/** 
 * Return BroPaser JSON String
 */
public static String getBroJsonString(){
  return BroParserTest.broJsonString;
}
Program: 116977
Project: 116977
Buggy source:
/** 
 * @throws java.lang.Exception
 */
public static void setUpBeforeClass() throws Exception {
  setBroJsonString("String_Node_Str");
}

Fixed version (ground truth):
/** 
 * @throws java.lang.Exception
 */
public static void setUpBeforeClass() throws Exception {
}
Program: 116978
Project: 116978
Buggy source:
/** 
 * @throws java.lang.Exception
 */
public void setUp() throws Exception {
  assertNotNull(getBroJsonString());
  BroParserTest.setBroParser(new BasicBroParser());
}

Fixed version (ground truth):
/** 
 * @throws java.lang.Exception
 */
public void setUp() throws Exception {
  setBroJsonString("String_Node_Str");
  assertNotNull(getBroJsonString());
  BroParserTest.setBroParser(new BasicBroParser());
}
Program: 116979
Project: 116979
Buggy source:
/** 
 * @throws ParseException Tests for Parse Method Parses Static json Stirng and checks if any spl chars are present in parsed string.
 */
@SuppressWarnings({"String_Node_Str","String_Node_Str"}) public void testParse() throws ParseException {
  BasicBroParser broparser=new BasicBroParser();
  JSONObject cleanJson=broparser.parse(getBroJsonString().getBytes());
  System.out.println(cleanJson);
  Pattern p=Pattern.compile("String_Node_Str",Pattern.CASE_INSENSITIVE);
  JSONParser parser=new JSONParser();
  Map json=(Map)cleanJson;
  Map output=new HashMap();
  Iterator iter=json.entrySet().iterator();
  while (iter.hasNext()) {
    Map.Entry entry=(Map.Entry)iter.next();
    String key=(String)entry.getKey();
    Matcher m=p.matcher(key);
    boolean b=m.find();
    assertFalse(b);
  }
}

Fixed version (ground truth):
/** 
 * @throws ParseException Tests for Parse Method Parses Static json String and checks if any spl chars are present in parsed string.
 */
@SuppressWarnings({"String_Node_Str","String_Node_Str"}) public void testParse() throws ParseException {
  BasicBroParser broparser=new BasicBroParser();
  assertNotNull(getBroJsonString());
  JSONObject cleanJson=broparser.parse(getBroJsonString().getBytes());
  assertNotNull(cleanJson);
  System.out.println(cleanJson);
  Pattern p=Pattern.compile("String_Node_Str",Pattern.CASE_INSENSITIVE);
  JSONParser parser=new JSONParser();
  Map json=(Map)cleanJson;
  Map output=new HashMap();
  Iterator iter=json.entrySet().iterator();
  while (iter.hasNext()) {
    Map.Entry entry=(Map.Entry)iter.next();
    String key=(String)entry.getKey();
    Matcher m=p.matcher(key);
    boolean b=m.find();
    assertFalse(b);
  }
}
Program: 116980
Project: 116980
Buggy source:
/** 
 * Return BroPaser JSON String
 */
public static String getBroJsonString(){
  return broJsonString;
}

Fixed version (ground truth):
/** 
 * Return BroPaser JSON String
 */
public static String getBroJsonString(){
  return BroParserTest.broJsonString;
}
Program: 116981
Project: 116981
Buggy source:
/** 
 * @throws java.lang.Exception
 */
public static void setUpBeforeClass() throws Exception {
  setBroJsonString("String_Node_Str");
}

Fixed version (ground truth):
/** 
 * @throws java.lang.Exception
 */
public static void setUpBeforeClass() throws Exception {
}
Program: 116982
Project: 116982
Buggy source:
/** 
 * @throws java.lang.Exception
 */
public void setUp() throws Exception {
  assertNotNull(getBroJsonString());
  BroParserTest.setBroParser(new BasicBroParser());
}

Fixed version (ground truth):
/** 
 * @throws java.lang.Exception
 */
public void setUp() throws Exception {
  setBroJsonString("String_Node_Str");
  assertNotNull(getBroJsonString());
  BroParserTest.setBroParser(new BasicBroParser());
}
Program: 116983
Project: 116983
Buggy source:
/** 
 * @throws ParseException Tests for Parse Method Parses Static json Stirng and checks if any spl chars are present in parsed string.
 */
@SuppressWarnings({"String_Node_Str","String_Node_Str"}) public void testParse() throws ParseException {
  BasicBroParser broparser=new BasicBroParser();
  JSONObject cleanJson=broparser.parse(getBroJsonString().getBytes());
  System.out.println(cleanJson);
  Pattern p=Pattern.compile("String_Node_Str",Pattern.CASE_INSENSITIVE);
  JSONParser parser=new JSONParser();
  Map json=(Map)cleanJson;
  Map output=new HashMap();
  Iterator iter=json.entrySet().iterator();
  while (iter.hasNext()) {
    Map.Entry entry=(Map.Entry)iter.next();
    String key=(String)entry.getKey();
    Matcher m=p.matcher(key);
    boolean b=m.find();
    assertFalse(b);
  }
}

Fixed version (ground truth):
/** 
 * @throws ParseException Tests for Parse Method Parses Static json String and checks if any spl chars are present in parsed string.
 */
@SuppressWarnings({"String_Node_Str","String_Node_Str"}) public void testParse() throws ParseException {
  BasicBroParser broparser=new BasicBroParser();
  assertNotNull(getBroJsonString());
  JSONObject cleanJson=broparser.parse(getBroJsonString().getBytes());
  assertNotNull(cleanJson);
  System.out.println(cleanJson);
  Pattern p=Pattern.compile("String_Node_Str",Pattern.CASE_INSENSITIVE);
  JSONParser parser=new JSONParser();
  Map json=(Map)cleanJson;
  Map output=new HashMap();
  Iterator iter=json.entrySet().iterator();
  while (iter.hasNext()) {
    Map.Entry entry=(Map.Entry)iter.next();
    String key=(String)entry.getKey();
    Matcher m=p.matcher(key);
    boolean b=m.find();
    assertFalse(b);
  }
}
Program: 116985
Project: 116985
Buggy source:
@Override protected void onDestroy(){
  super.onDestroy();
  if (this.mWebview != null) {
    this.mWebview.stopLoading();
    ViewGroup parent=(ViewGroup)this.mWebview.getParent();
    if (parent != null) {
      parent.removeView((View)this.mWebview);
    }
    if (!this.isPoolWebview)     this.mWebview.destroy();
  }
  this.loginManager.deleteObserver(this);
}

Fixed version (ground truth):
@Override protected void onDestroy(){
  super.onDestroy();
  if (this.mWebview != null) {
    this.mWebview.stopLoading();
    ViewGroup parent=(ViewGroup)this.mWebview.getParent();
    if (parent != null) {
      parent.removeView((View)this.mWebview);
    }
    if (!this.isPoolWebview)     this.mWebview.destroy();
  }
  this.loginManager.deleteObserver(this);
  if (this.navigationTitlesChangedReceiver != null) {
    LocalBroadcastManager.getInstance(this).unregisterReceiver(this.navigationTitlesChangedReceiver);
  }
}
Program: 116988
Project: 116988
Buggy source:
public static void setupWebviewGlobals(Context context){
  if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) {
    Map<String,Object> installation=Installation.getInfo(context);
    String dist=(String)installation.get("String_Node_Str");
    if (dist != null && (dist.equals("String_Node_Str") || dist.equals("String_Node_Str"))) {
      XWalkPreferences.setValue(XWalkPreferences.REMOTE_DEBUGGING,true);
    }
  }
}

Fixed version (ground truth):
public static void setupWebviewGlobals(Context context){
  if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) {
    Map<String,Object> installation=Installation.getInfo(context);
    String dist=(String)installation.get("String_Node_Str");
    if (dist != null && (dist.equals("String_Node_Str") || dist.equals("String_Node_Str"))) {
      XWalkPreferences.setValue(XWalkPreferences.REMOTE_DEBUGGING,true);
    }
  }
  XWalkPreferences.setValue(XWalkPreferences.ANIMATABLE_XWALK_VIEW,true);
}
Program: 116989
Project: 116989
Buggy source:
@Override public void onPageStarted(WebView view,String url,Bitmap favicon){
  UrlInspector.getInstance().inspectUrl(url);
  Uri uri=Uri.parse(url);
  if (AppConfig.getInstance(mainActivity).loginDetectionUrl != null && isInternalUri(uri)) {
    mainActivity.updateMenu();
  }
  super.onPageStarted(view,url,favicon);
  mainActivity.startCheckingReadyStatus();
  LocalBroadcastManager.getInstance(mainActivity).sendBroadcast(new Intent(this.STARTED_LOADING_MESSAGE));
}

Fixed version (ground truth):
@Override public void onPageStarted(WebView view,String url,Bitmap favicon){
  UrlInspector.getInstance().inspectUrl(url);
  Uri uri=Uri.parse(url);
  if (AppConfig.getInstance(mainActivity).loginDetectionUrl != null && isInternalUri(uri)) {
    mainActivity.updateMenu();
  }
  super.onPageStarted(view,url,favicon);
  mainActivity.startCheckingReadyStatus();
  LocalBroadcastManager.getInstance(mainActivity).sendBroadcast(new Intent(LeanWebviewClient.STARTED_LOADING_MESSAGE));
}
Program: 116990
Project: 116990
Buggy source:
@Override public void onPageFinished(WebView view,String url){
  mainActivity.runOnUiThread(new Runnable(){
    @Override public void run(){
      mainActivity.showWebview();
    }
  }
);
  UrlInspector.getInstance().inspectUrl(url);
  super.onPageFinished(view,url);
  Uri uri=Uri.parse(url);
  if (isInternalUri(uri)) {
    CookieSyncManager.getInstance().sync();
  }
  AppConfig appConfig=AppConfig.getInstance(mainActivity);
  if (appConfig.loginDetectionUrl != null) {
    if (mVisitedLoginOrSignup) {
      mainActivity.updateMenu();
    }
    mVisitedLoginOrSignup=LeanUtils.urlsMatchOnPath(url,appConfig.loginUrl) || LeanUtils.urlsMatchOnPath(url,appConfig.signupUrl);
  }
  if (this.dynamicUpdateExec != null) {
    LeanUtils.runJavascriptOnWebView(view,this.dynamicUpdateExec);
  }
  if (this.profilePickerExec != null) {
    LeanUtils.runJavascriptOnWebView(view,this.profilePickerExec);
  }
  if (this.analyticsExec != null) {
    LeanUtils.runJavascriptOnWebView(view,this.analyticsExec);
  }
  mainActivity.checkNavigationForPage(url);
  if (mainActivity.postLoadJavascript != null) {
    String js=mainActivity.postLoadJavascript;
    mainActivity.postLoadJavascript=null;
    mainActivity.runJavascript(js);
  }
  LocalBroadcastManager.getInstance(mainActivity).sendBroadcast(new Intent(this.FINISHED_LOADING_MESSAGE));
}

Fixed version (ground truth):
@Override public void onPageFinished(WebView view,String url){
  mainActivity.runOnUiThread(new Runnable(){
    @Override public void run(){
      mainActivity.showWebview();
    }
  }
);
  UrlInspector.getInstance().inspectUrl(url);
  super.onPageFinished(view,url);
  Uri uri=Uri.parse(url);
  if (isInternalUri(uri)) {
    CookieSyncManager.getInstance().sync();
  }
  AppConfig appConfig=AppConfig.getInstance(mainActivity);
  if (appConfig.loginDetectionUrl != null) {
    if (mVisitedLoginOrSignup) {
      mainActivity.updateMenu();
    }
    mVisitedLoginOrSignup=LeanUtils.urlsMatchOnPath(url,appConfig.loginUrl) || LeanUtils.urlsMatchOnPath(url,appConfig.signupUrl);
  }
  if (this.dynamicUpdateExec != null) {
    LeanUtils.runJavascriptOnWebView(view,this.dynamicUpdateExec);
  }
  if (this.profilePickerExec != null) {
    LeanUtils.runJavascriptOnWebView(view,this.profilePickerExec);
  }
  if (this.analyticsExec != null) {
    LeanUtils.runJavascriptOnWebView(view,this.analyticsExec);
  }
  mainActivity.checkNavigationForPage(url);
  if (mainActivity.postLoadJavascript != null) {
    String js=mainActivity.postLoadJavascript;
    mainActivity.postLoadJavascript=null;
    mainActivity.runJavascript(js);
  }
  LocalBroadcastManager.getInstance(mainActivity).sendBroadcast(new Intent(LeanWebviewClient.FINISHED_LOADING_MESSAGE));
}
Program: 116991
Project: 116991
Buggy source:
public boolean shouldOverrideUrlLoading(WebView view,String url,boolean isReload){
  boolean shouldOverride=shouldOverrideUrlLoadingNoIntercept(view,url);
  if (shouldOverride)   return shouldOverride;
  if (AppConfig.getInstance(mainActivity).interceptHtml) {
    try {
      URL parsedUrl=new URL(url);
      if (parsedUrl.getProtocol().equals("String_Node_Str") || parsedUrl.getProtocol().equals("String_Node_Str")) {
        mainActivity.setProgress(0);
        new WebviewInterceptTask(this.mainActivity,this).execute(new WebviewInterceptTask.WebviewInterceptParams(view,parsedUrl,isReload));
        mainActivity.hideWebview();
        return true;
      }
    }
 catch (    Exception e) {
      Log.e(TAG,e.getMessage(),e);
    }
  }
  mainActivity.hideWebview();
  return false;
}

Fixed version (ground truth):
public boolean shouldOverrideUrlLoading(WebView view,String url,boolean isReload){
  if (url == null)   return false;
  boolean shouldOverride=shouldOverrideUrlLoadingNoIntercept(view,url);
  if (shouldOverride)   return true;
  if (AppConfig.getInstance(mainActivity).interceptHtml) {
    try {
      URL parsedUrl=new URL(url);
      if (parsedUrl.getProtocol().equals("String_Node_Str") || parsedUrl.getProtocol().equals("String_Node_Str")) {
        mainActivity.setProgress(0);
        new WebviewInterceptTask(this.mainActivity,this).execute(new WebviewInterceptTask.WebviewInterceptParams(view,parsedUrl,isReload));
        mainActivity.hideWebview();
        return true;
      }
    }
 catch (    Exception e) {
      Log.e(TAG,e.getMessage(),e);
    }
  }
  mainActivity.hideWebview();
  return false;
}
Program: 116992
Project: 116992
Buggy source:
public LeanWebviewClient(MainActivity activity){
  super();
  this.mainActivity=activity;
  AppConfig appConfig=AppConfig.getInstance(mainActivity);
  if (appConfig.profilePickerJS != null) {
    StringBuilder sb=new StringBuilder();
    sb.append("String_Node_Str");
    sb.append(LeanUtils.jsWrapString(appConfig.profilePickerJS));
    sb.append("String_Node_Str");
    this.profilePickerExec=sb.toString();
  }
  if (appConfig.analytics) {
    String distribution=(String)Installation.getInfo(mainActivity).get("String_Node_Str");
    int idsite;
    if (distribution != null && (distribution.equals("String_Node_Str") || distribution.equals("String_Node_Str")))     idsite=appConfig.idsite_prod;
 else     idsite=appConfig.idsite_test;
    this.analyticsExec=String.format("String_Node_Str" + "String_Node_Str" + "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str",idsite);
  }
  if (appConfig.updateConfigJS != null) {
    StringBuilder sb=new StringBuilder();
    sb.append("String_Node_Str");
    sb.append(LeanUtils.jsWrapString(appConfig.updateConfigJS));
    sb.append("String_Node_Str");
    this.dynamicUpdateExec=sb.toString();
  }
}

Fixed version (ground truth):
public LeanWebviewClient(MainActivity activity){
  super();
  this.mainActivity=activity;
  AppConfig appConfig=AppConfig.getInstance(mainActivity);
  if (appConfig.profilePickerJS != null) {
    this.profilePickerExec="String_Node_Str" + LeanUtils.jsWrapString(appConfig.profilePickerJS) + "String_Node_Str";
  }
  if (appConfig.analytics) {
    String distribution=(String)Installation.getInfo(mainActivity).get("String_Node_Str");
    int idsite;
    if (distribution != null && (distribution.equals("String_Node_Str") || distribution.equals("String_Node_Str")))     idsite=appConfig.idsite_prod;
 else     idsite=appConfig.idsite_test;
    this.analyticsExec=String.format("String_Node_Str" + "String_Node_Str" + "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str",idsite);
  }
  if (appConfig.updateConfigJS != null) {
    this.dynamicUpdateExec="String_Node_Str" + LeanUtils.jsWrapString(appConfig.updateConfigJS) + "String_Node_Str";
  }
}
Program: 116994
Project: 116994
Buggy source:
@Override protected void onDestroy(){
  super.onDestroy();
  if (this.mWebview != null) {
    this.mWebview.stopLoading();
    ViewGroup parent=(ViewGroup)this.mWebview.getParent();
    if (parent != null) {
      parent.removeView(this.mWebview);
    }
    this.mWebview.destroy();
  }
}

Fixed version (ground truth):
@Override protected void onDestroy(){
  super.onDestroy();
  if (this.mWebview != null) {
    this.mWebview.stopLoading();
    ViewGroup parent=(ViewGroup)this.mWebview.getParent();
    if (parent != null) {
      parent.removeView(this.mWebview);
    }
    if (!this.isPoolWebview)     this.mWebview.destroy();
  }
}
Program: 116995
Project: 116995
Buggy source:
private void resumeLoading(){
  if (this.isMainActivityLoading || this.isLoading)   return;
  if (this.currentLoadingWebview != null && this.currentLoadingUrl != null) {
    this.currentLoadingWebview.loadUrl(this.currentLoadingUrl);
    this.isLoading=true;
    return;
  }
  if (!this.urlsToLoad.isEmpty()) {
    String urlString=this.urlsToLoad.iterator().next();
    this.currentLoadingUrl=urlString;
    LeanWebView webview=new LeanWebView(this.context);
    LeanUtils.setupWebview(webview,this.context);
    WindowManager wm=(WindowManager)context.getSystemService(Context.WINDOW_SERVICE);
    Display display=wm.getDefaultDisplay();
    Point size=new Point();
    display.getSize(size);
    webview.layout(0,0,size.x,size.y);
    webview.setWebViewClient(this.webviewClient);
    this.currentLoadingWebview=webview;
    this.urlsToLoad.remove(urlString);
    this.currentLoadingWebview.loadUrl(urlString);
  }
}

Fixed version (ground truth):
private void resumeLoading(){
  if (this.isMainActivityLoading || this.isLoading)   return;
  if (this.currentLoadingWebview != null && this.currentLoadingUrl != null) {
    context.runOnUiThread(new Runnable(){
      @Override public void run(){
        currentLoadingWebview.loadUrl(currentLoadingUrl);
      }
    }
);
    this.isLoading=true;
    return;
  }
  if (!this.urlsToLoad.isEmpty()) {
    final String urlString=this.urlsToLoad.iterator().next();
    this.currentLoadingUrl=urlString;
    context.runOnUiThread(new Runnable(){
      @Override public void run(){
        LeanWebView webview=new LeanWebView(context);
        currentLoadingWebview=webview;
        urlsToLoad.remove(urlString);
        LeanUtils.setupWebview(webview,context);
        WindowManager wm=(WindowManager)context.getSystemService(Context.WINDOW_SERVICE);
        Display display=wm.getDefaultDisplay();
        Point size=new Point();
        display.getSize(size);
        webview.layout(0,0,size.x,size.y);
        webview.setWebViewClient(webviewClient);
        currentLoadingWebview=webview;
        urlsToLoad.remove(urlString);
        currentLoadingWebview.loadUrl(urlString);
      }
    }
);
  }
}
Program: 116997
Project: 116997
Buggy source:
@Override public void onPageFinished(WebView view,String url){
  super.onPageFinished(view,url);
  WebViewPool pool=WebViewPool.this;
  view.setWebViewClient(null);
  pool.urlToWebview.put(pool.currentLoadingUrl,pool.currentLoadingWebview);
  pool.currentLoadingUrl=null;
  pool.currentLoadingWebview=null;
  pool.isLoading=false;
  pool.resumeLoading();
}

Fixed version (ground truth):
@Override public void onPageFinished(final WebView view,String url){
  super.onPageFinished(view,url);
  WebViewPool pool=WebViewPool.this;
  context.runOnUiThread(new Runnable(){
    @Override public void run(){
      view.setWebViewClient(null);
    }
  }
);
  pool.urlToWebview.put(pool.currentLoadingUrl,pool.currentLoadingWebview);
  pool.currentLoadingUrl=null;
  pool.currentLoadingWebview=null;
  pool.isLoading=false;
  pool.resumeLoading();
}
Program: 117000
Project: 117000
Buggy source:
@Override public void onPageFinished(WebView view,String url){
  mainActivity.runOnUiThread(new Runnable(){
    @Override public void run(){
      mainActivity.showWebview();
    }
  }
);
  UrlInspector.getInstance().inspectUrl(url);
  super.onPageFinished(view,url);
  Uri uri=Uri.parse(url);
  if (isInternalUri(uri)) {
    CookieSyncManager.getInstance().sync();
  }
  AppConfig appConfig=AppConfig.getInstance(mainActivity);
  if (appConfig.loginDetectionUrl != null) {
    if (mVisitedLoginOrSignup) {
      mainActivity.updateMenu();
    }
    mVisitedLoginOrSignup=LeanUtils.urlsMatchOnPath(url,appConfig.loginUrl) || LeanUtils.urlsMatchOnPath(url,appConfig.signupUrl);
  }
  if (this.dynamicUpdateExec != null) {
    LeanUtils.runJavascriptOnWebView(view,this.dynamicUpdateExec);
  }
  if (this.profilePickerExec != null) {
    LeanUtils.runJavascriptOnWebView(view,this.profilePickerExec);
  }
  if (this.analyticsExec != null) {
    LeanUtils.runJavascriptOnWebView(view,this.analyticsExec);
  }
  mainActivity.checkNavigationForPage(url);
  if (mainActivity.postLoadJavascript != null) {
    String js=mainActivity.postLoadJavascript;
    mainActivity.postLoadJavascript=null;
    mainActivity.runJavascript(js);
  }
  LocalBroadcastManager.getInstance(mainActivity).sendBroadcast(new Intent(LeanWebviewClient.FINISHED_LOADING_MESSAGE));
}

Fixed version (ground truth):
@Override public void onPageFinished(WebView view,String url){
  super.onPageFinished(view,url);
  AppConfig appConfig=AppConfig.getInstance(mainActivity);
  if (url != null && appConfig.ignorePageFinishedRegexes != null) {
    for (    Pattern pattern : appConfig.ignorePageFinishedRegexes) {
      if (pattern.matcher(url).matches())       return;
    }
  }
  mainActivity.runOnUiThread(new Runnable(){
    @Override public void run(){
      mainActivity.showWebview();
    }
  }
);
  UrlInspector.getInstance().inspectUrl(url);
  Uri uri=Uri.parse(url);
  if (isInternalUri(uri)) {
    CookieSyncManager.getInstance().sync();
  }
  if (appConfig.loginDetectionUrl != null) {
    if (mVisitedLoginOrSignup) {
      mainActivity.updateMenu();
    }
    mVisitedLoginOrSignup=LeanUtils.urlsMatchOnPath(url,appConfig.loginUrl) || LeanUtils.urlsMatchOnPath(url,appConfig.signupUrl);
  }
  if (this.dynamicUpdateExec != null) {
    LeanUtils.runJavascriptOnWebView(view,this.dynamicUpdateExec);
  }
  if (this.profilePickerExec != null) {
    LeanUtils.runJavascriptOnWebView(view,this.profilePickerExec);
  }
  if (this.analyticsExec != null) {
    LeanUtils.runJavascriptOnWebView(view,this.analyticsExec);
  }
  mainActivity.checkNavigationForPage(url);
  if (mainActivity.postLoadJavascript != null) {
    String js=mainActivity.postLoadJavascript;
    mainActivity.postLoadJavascript=null;
    mainActivity.runJavascript(js);
  }
  LocalBroadcastManager.getInstance(mainActivity).sendBroadcast(new Intent(LeanWebviewClient.FINISHED_LOADING_MESSAGE));
}
Program: 117002
Project: 117002
Buggy source:
@Override public boolean onOptionsItemSelected(MenuItem item){
  if (mDrawerToggle != null) {
    if (mDrawerToggle.onOptionsItemSelected(item)) {
      return true;
    }
  }
  if (this.actionManager != null) {
    if (this.actionManager.onOptionsItemSelected(item)) {
      return true;
    }
  }
switch (item.getItemId()) {
case android.R.id.home:
    finish();
  return true;
case R.id.action_search:
return true;
case R.id.action_refresh:
if (this.mWebview.getUrl() != null && this.mWebview.getUrl().startsWith("String_Node_Str")) {
this.mWebview.goBack();
updateMenu();
}
 else {
this.mWebview.reload();
}
return true;
default :
return super.onOptionsItemSelected(item);
}
}

Fixed version (ground truth):
@Override public boolean onOptionsItemSelected(MenuItem item){
  if (mDrawerToggle != null) {
    if (mDrawerToggle.onOptionsItemSelected(item)) {
      return true;
    }
  }
  if (this.actionManager != null) {
    if (this.actionManager.onOptionsItemSelected(item)) {
      return true;
    }
  }
switch (item.getItemId()) {
case android.R.id.home:
    finish();
  return true;
case R.id.action_search:
return true;
case R.id.action_refresh:
String url=this.mWebview.getUrl();
if (url != null && url.startsWith("String_Node_Str")) {
this.mWebview.goBack();
updateMenu();
}
 else {
this.postLoadJavascript=this.postLoadJavascriptForRefresh;
this.mWebview.loadUrl(url);
}
return true;
default :
return super.onOptionsItemSelected(item);
}
}
Program: 117003
Project: 117003
Buggy source:
public void loadUrl(String url){
  if (url.equalsIgnoreCase("String_Node_Str"))   logout();
 else   this.mWebview.loadUrl(url);
  if (this.tabManager != null)   this.tabManager.selectTab(url,null);
}

Fixed version (ground truth):
public void loadUrl(String url){
  this.postLoadJavascript=null;
  this.postLoadJavascriptForRefresh=null;
  if (url.equalsIgnoreCase("String_Node_Str"))   logout();
 else   this.mWebview.loadUrl(url);
  if (this.tabManager != null)   this.tabManager.selectTab(url,null);
}
Program: 117005
Project: 117005
Buggy source:
public void loadUrlAndJavascript(String url,String javascript){
  String currentUrl=this.mWebview.getUrl();
  if (url != null && currentUrl != null && url.equals(currentUrl)) {
    hideWebview();
    runJavascript(javascript);
    showWebview();
  }
 else {
    this.postLoadJavascript=javascript;
    loadUrl(url);
  }
  if (this.tabManager != null)   this.tabManager.selectTab(url,javascript);
}

Fixed version (ground truth):
public void loadUrlAndJavascript(String url,String javascript){
  String currentUrl=this.mWebview.getUrl();
  if (url != null && currentUrl != null && url.equals(currentUrl)) {
    runJavascript(javascript);
    this.postLoadJavascriptForRefresh=javascript;
  }
 else {
    this.postLoadJavascript=javascript;
    this.postLoadJavascriptForRefresh=javascript;
    this.mWebview.loadUrl(url);
  }
  if (this.tabManager != null)   this.tabManager.selectTab(url,javascript);
}
Program: 117009
Project: 117009
Buggy source:
public void loadUrl(String url){
  this.postLoadJavascript=null;
  this.postLoadJavascriptForRefresh=null;
  if (url.equalsIgnoreCase("String_Node_Str"))   logout();
 else   this.mWebview.loadUrl(url);
  if (this.tabManager != null)   this.tabManager.selectTab(url,null);
}

Fixed version (ground truth):
public void loadUrl(String url,boolean isFromTab){
  this.postLoadJavascript=null;
  this.postLoadJavascriptForRefresh=null;
  if (url.equalsIgnoreCase("String_Node_Str"))   logout();
 else   this.mWebview.loadUrl(url);
  if (!isFromTab && this.tabManager != null)   this.tabManager.selectTab(url,null);
}
Program: 117011
Project: 117011
Buggy source:
public void loadUrlAndJavascript(String url,String javascript){
  String currentUrl=this.mWebview.getUrl();
  if (url != null && currentUrl != null && url.equals(currentUrl)) {
    runJavascript(javascript);
    this.postLoadJavascriptForRefresh=javascript;
  }
 else {
    this.postLoadJavascript=javascript;
    this.postLoadJavascriptForRefresh=javascript;
    this.mWebview.loadUrl(url);
  }
  if (this.tabManager != null)   this.tabManager.selectTab(url,javascript);
}

Fixed version (ground truth):
public void loadUrlAndJavascript(String url,String javascript,boolean isFromTab){
  String currentUrl=this.mWebview.getUrl();
  if (url != null && currentUrl != null && url.equals(currentUrl)) {
    runJavascript(javascript);
    this.postLoadJavascriptForRefresh=javascript;
  }
 else {
    this.postLoadJavascript=javascript;
    this.postLoadJavascriptForRefresh=javascript;
    this.mWebview.loadUrl(url);
  }
  if (!isFromTab && this.tabManager != null)   this.tabManager.selectTab(url,javascript);
}
Program: 117012
Project: 117012
Buggy source:
@Override public void onTabClick(int position){
  if (this.tabs != null && position < this.tabs.length()) {
    JSONObject entry=this.tabs.optJSONObject(position);
    String url=entry.optString("String_Node_Str");
    String javascript=entry.optString("String_Node_Str");
    if (url != null && !url.isEmpty()) {
      if (javascript != null)       mainActivity.loadUrlAndJavascript(url,javascript);
 else       mainActivity.loadUrl(url);
    }
  }
}

Fixed version (ground truth):
@Override public void onTabClick(int position){
  if (this.tabs != null && position < this.tabs.length()) {
    JSONObject entry=this.tabs.optJSONObject(position);
    String url=entry.optString("String_Node_Str");
    String javascript=entry.optString("String_Node_Str");
    if (url != null && !url.isEmpty()) {
      if (javascript != null)       mainActivity.loadUrlAndJavascript(url,javascript,true);
 else       mainActivity.loadUrl(url,true);
    }
  }
}
Program: 117017
Project: 117017
Buggy source:
public void loadUrl(String url){
  if (url.equalsIgnoreCase("String_Node_Str"))   logout();
 else   this.mWebview.loadUrl(url);
}

Fixed version (ground truth):
public void loadUrl(String url){
  if (url.equalsIgnoreCase("String_Node_Str"))   logout();
 else   this.mWebview.loadUrl(url);
  if (this.tabManager != null)   this.tabManager.selectTab(url,null);
}
Program: 117019
Project: 117019
Buggy source:
public void loadUrlAndJavascript(String url,String javascript){
  String currentUrl=this.mWebview.getUrl();
  if (url != null && currentUrl != null && url.equals(currentUrl)) {
    hideWebview();
    runJavascript(javascript);
    showWebview();
  }
 else {
    this.postLoadJavascript=javascript;
    loadUrl(url);
  }
}

Fixed version (ground truth):
public void loadUrlAndJavascript(String url,String javascript){
  String currentUrl=this.mWebview.getUrl();
  if (url != null && currentUrl != null && url.equals(currentUrl)) {
    hideWebview();
    runJavascript(javascript);
    showWebview();
  }
 else {
    this.postLoadJavascript=javascript;
    loadUrl(url);
  }
  if (this.tabManager != null)   this.tabManager.selectTab(url,javascript);
}
Program: 117020
Project: 117020
Buggy source:
public TabManager(MainActivity mainActivity){
  this.mainActivity=mainActivity;
  this.broadcastReceiver=new BroadcastReceiver(){
    @Override public void onReceive(    Context context,    Intent intent){
      if (intent.getAction() != null && intent.getAction().equals(AppConfig.PROCESSED_TAB_NAVIGATION_MESSAGE)) {
        currentMenuId=null;
        checkTabs(currentUrl);
      }
    }
  }
;
  LocalBroadcastManager.getInstance(this.mainActivity).registerReceiver(this.broadcastReceiver,new IntentFilter(AppConfig.PROCESSED_TAB_NAVIGATION_MESSAGE));
}

Fixed version (ground truth):
public TabManager(MainActivity mainActivity,ViewPager viewPager){
  this.mainActivity=mainActivity;
  this.viewPager=viewPager;
  this.broadcastReceiver=new BroadcastReceiver(){
    @Override public void onReceive(    Context context,    Intent intent){
      if (intent.getAction() != null && intent.getAction().equals(AppConfig.PROCESSED_TAB_NAVIGATION_MESSAGE)) {
        currentMenuId=null;
        checkTabs(currentUrl);
      }
    }
  }
;
  LocalBroadcastManager.getInstance(this.mainActivity).registerReceiver(this.broadcastReceiver,new IntentFilter(AppConfig.PROCESSED_TAB_NAVIGATION_MESSAGE));
}
Program: 117022
Project: 117022
Buggy source:
public static void runJavascriptOnWebView(WebView webview,String js){
  if (Build.VERSION.SDK_INT < Build.VERSION_CODES.KITKAT) {
    webview.loadUrl("String_Node_Str" + js);
  }
 else {
    webview.evaluateJavascript(js,null);
  }
}

Fixed version (ground truth):
public static void runJavascriptOnWebView(WebView webview,String js){
  if (Build.VERSION.SDK_INT < Build.VERSION_CODES.KITKAT) {
    if (webview instanceof LeanWebView) {
      ((LeanWebView)webview).loadUrlDirect("String_Node_Str" + js);
    }
 else {
      webview.loadUrl("String_Node_Str" + js);
    }
  }
 else {
    webview.evaluateJavascript(js,null);
  }
}