nus-yam/ex-repair huggingface dataset:
Program: 13313
Project: 13313
Buggy source:
public static AggExpr createAggExpr(String aggregateName,String aggregateParam){
  ParameterInfo param;
switch (aggregateName) {
case "String_Node_Str":
    param=new ParameterInfo();
  param.isAllColumn=true;
return new AggExpr(CountAggFunction.NAME,param);
case "String_Node_Str":
param=new ParameterInfo();
param.columnName=aggregateParam;
return new AggExpr(MinAggFunction.NAME,param);
default :
throw new SQLParseException("String_Node_Str" + aggregateName);
}
}

Fixed version (ground truth):
public static AggExpr createAggExpr(String aggregateName,String aggregateParam){
  ParameterInfo param;
switch (aggregateName) {
case "String_Node_Str":
case "String_Node_Str":
    param=new ParameterInfo();
  param.isAllColumn=true;
return new AggExpr(CountAggFunction.NAME,param);
case "String_Node_Str":
param=new ParameterInfo();
param.columnName=aggregateParam;
return new AggExpr(MinAggFunction.NAME,param);
default :
throw new SQLParseException("String_Node_Str" + aggregateName);
}
}
Program: 13314
Project: 13314
Buggy source:
public abstract AggState createAggState();

Fixed version (ground truth):
public abstract T createAggState();
Program: 13315
Project: 13315
Buggy source:
public abstract void iterate(AggState state,Object columnValue);

Fixed version (ground truth):
public abstract void iterate(T state,Object columnValue);
Program: 13316
Project: 13316
Buggy source:
public abstract void reduce(AggState other);

Fixed version (ground truth):
public abstract void reduce(T other);
Program: 13317
Project: 13317
Buggy source:
@Override public AggState createAggState(){
  return new CountAggState();
}

Fixed version (ground truth):
@Override public CountAggState createAggState(){
  return new CountAggState();
}
Program: 13318
Project: 13318
Buggy source:
@Override public void iterate(AggState state,Object columnValue){
  ((CountAggState)state).value++;
}

Fixed version (ground truth):
@Override public void iterate(CountAggState state,Object columnValue){
  state.value++;
}
Program: 13319
Project: 13319
Buggy source:
@Override public void reduce(AggState other){
}

Fixed version (ground truth):
public void reduce(CountAggState other){
  value+=other.value;
}
Program: 13320
Project: 13320
Buggy source:
@Override public int compareTo(AggState o){
  CountAggState countAggState=(CountAggState)o;
  return Long.compare(value,countAggState.value);
}

Fixed version (ground truth):
@Override public int compareTo(CountAggState o){
  return Long.compare(value,o.value);
}
Program: 13321
Project: 13321
Buggy source:
@Override public AggState createAggState(){
  return new MinAggState();
}

Fixed version (ground truth):
@Override public MinAggState createAggState(){
  return new MinAggState();
}
Program: 13322
Project: 13322
Buggy source:
@Override public void iterate(AggState state,Object columnValue){
  newAggState.value=columnValue;
  state.reduce(newAggState);
}

Fixed version (ground truth):
@Override public void iterate(MinAggState state,Object columnValue){
  newAggState.value=columnValue;
  state.reduce(newAggState);
}
Program: 13323
Project: 13323
Buggy source:
private void handleAggregateNode(ParsedStatement stmt,ResultColumn column){
  AggregateNode node=(AggregateNode)column.getExpression();
  if (node.getAggregateName().startsWith("String_Node_Str")) {
    ValueNode operand=node.getOperand();
    if (operand != null) {
      validateCountOperand(operand);
    }
    AggExpr aggExpr=AggExprFactory.createAggExpr("String_Node_Str");
    stmt.resultColumnList.add(aggExpr);
    stmt.aggregateExpressions.add(aggExpr);
    String alias=column.getName() != null ? column.getName() : node.getAggregateName();
    stmt.countRequest(true);
    stmt.addOutputField(alias,node.getAggregateName());
  }
 else   if (node.getAggregateName().startsWith("String_Node_Str")) {
    ColumnReference operand=(ColumnReference)node.getOperand();
    if (operand == null) {
      throw new SQLParseException("String_Node_Str");
    }
    AggExpr aggExpr=AggExprFactory.createAggExpr("String_Node_Str",operand.getColumnName());
    stmt.resultColumnList.add(aggExpr);
    stmt.aggregateExpressions.add(aggExpr);
    String alias=column.getName() != null ? column.getName() : operand.getColumnName();
    stmt.addOutputField(alias,operand.getColumnName());
  }
 else {
    throw new SQLParseException("String_Node_Str" + node.getAggregateName());
  }
}

Fixed version (ground truth):
private void handleAggregateNode(ParsedStatement stmt,ResultColumn column){
  AggregateNode node=(AggregateNode)column.getExpression();
  AggExpr aggExpr=getAggregateExpression(node);
  if (aggExpr != null) {
    if (aggExpr.functionName.startsWith(CountAggFunction.NAME)) {
      stmt.countRequest(true);
    }
    stmt.resultColumnList.add(aggExpr);
    stmt.aggregateExpressions.add(aggExpr);
    String alias=aggExpr.toString();
    stmt.addOutputField(alias,node.getAggregateName());
  }
}
Program: 13324
Project: 13324
Buggy source:
/** 
 * verify that the operand in the count function translates to a count(*) because anything else isn't supported right now.
 * @param operand
 */
private void validateCountOperand(ValueNode operand) throws SQLParseException {
switch (operand.getNodeType()) {
case NodeTypes.PARAMETER_NODE:
    ParameterNode parameterNode=(ParameterNode)operand;
  Object value=args[parameterNode.getParameterNumber()];
if (!value.equals("String_Node_Str")) {
  throw new SQLParseException("String_Node_Str");
}
break;
case NodeTypes.COLUMN_REFERENCE:
if (!tableContext.primaryKeys().contains(operand.getColumnName())) {
throw new SQLParseException("String_Node_Str");
}
break;
default :
throw new SQLParseException("String_Node_Str");
}
}

Fixed version (ground truth):
/** 
 * verify that the operand in the count function translates to a count(*) or a column reference referencing the primary key because anything else isn't supported right now.
 * @param operand
 */
private void validateCountOperand(ValueNode operand) throws SQLParseException {
switch (operand.getNodeType()) {
case NodeTypes.PARAMETER_NODE:
    ParameterNode parameterNode=(ParameterNode)operand;
  Object value=args[parameterNode.getParameterNumber()];
if (!value.equals("String_Node_Str")) {
  throw new SQLParseException("String_Node_Str");
}
break;
case NodeTypes.COLUMN_REFERENCE:
if (!tableContext.primaryKeys().contains(operand.getColumnName())) {
throw new SQLParseException("String_Node_Str");
}
break;
default :
throw new SQLParseException("String_Node_Str");
}
}
Program: 13325
Project: 13325
Buggy source:
@Override public void messageReceived(SQLMapperResultRequest request,TransportChannel channel) throws Exception {
  SQLReduceJobStatus status=request.status;
  long now=0;
  if (logger.isTraceEnabled()) {
    logger.trace("String_Node_Str",clusterService.localNode().getId(),request.contextId);
    now=new Date().getTime();
  }
  status.merge(request.groupByResult);
  if (logger.isTraceEnabled()) {
    logger.trace("String_Node_Str",clusterService.localNode().getId(),request.contextId,(new Date().getTime() - now),status.groupByResult.size());
  }
  status.shardsToProcess.countDown();
  if (logger.isTraceEnabled()) {
    logger.trace("String_Node_Str",clusterService.localNode().getId(),request.contextId,status.shardsToProcess.getCount());
  }
  channel.sendResponse(TransportResponse.Empty.INSTANCE);
}

Fixed version (ground truth):
@Override public void messageReceived(SQLMapperResultRequest request,TransportChannel channel) throws Exception {
  SQLReduceJobStatus status=request.status;
  long now=0;
  if (logger.isTraceEnabled()) {
    logger.trace("String_Node_Str",clusterService.localNode().getId(),request.contextId);
    now=new Date().getTime();
  }
  status.merge(request.groupByResult);
  if (logger.isTraceEnabled()) {
    logger.trace("String_Node_Str",clusterService.localNode().getId(),request.contextId,(new Date().getTime() - now),status.groupByResult != null ? status.groupByResult.size() : 0);
  }
  status.shardsToProcess.countDown();
  if (logger.isTraceEnabled()) {
    logger.trace("String_Node_Str",clusterService.localNode().getId(),request.contextId,status.shardsToProcess.getCount());
  }
  channel.sendResponse(TransportResponse.Empty.INSTANCE);
}
Program: 13326
Project: 13326
Buggy source:
public Object value(){
  return value;
}

Fixed version (ground truth):
public abstract Object value();
Program: 13327
Project: 13327
Buggy source:
@Override public void iterate(MinAggState state,Object columnValue){
  newAggState.value=columnValue;
  state.reduce(newAggState);
}

Fixed version (ground truth):
@Override public void iterate(MinAggState state,Object columnValue){
  if (state.compareValue(columnValue) == 1) {
    state.value=columnValue;
  }
}
Program: 13328
Project: 13328
Buggy source:
@Override public void reduce(AggState other){
}

Fixed version (ground truth):
@Override public void reduce(MinAggState other){
  if (other.value == null) {
    return;
  }
 else   if (value == null) {
    value=other.value;
    return;
  }
  int res=compareTo(other);
  if (res == 1) {
    value=other.value;
  }
}
Program: 13329
Project: 13329
Buggy source:
@Override public int compareTo(AggState o){
  MinAggState minAggState=(MinAggState)o;
  return super.compareTo(minAggState);
}

Fixed version (ground truth):
@Override public int compareTo(MinAggState o){
  return compareValue(o.value);
}
Program: 13330
Project: 13330
Buggy source:
@Override public ColumnDefinition getColumnDefinition(String tableName,int ordinalPosition){
  return new ColumnDefinition(tableName,name,"String_Node_Str",ordinalPosition,false,true);
}

Fixed version (ground truth):
@Override public ColumnDefinition getColumnDefinition(String tableName,int ordinalPosition){
  return new ColumnDefinition(tableName,name,"String_Node_Str",null,ordinalPosition,false,true);
}
Program: 13331
Project: 13331
Buggy source:
@Override public ColumnDefinition getColumnDefinition(String tableName,int ordinalPosition){
  return new ColumnDefinition(tableName,name,"String_Node_Str",ordinalPosition,false,true);
}

Fixed version (ground truth):
@Override public ColumnDefinition getColumnDefinition(String tableName,int ordinalPosition){
  return new ColumnDefinition(tableName,name,"String_Node_Str",null,ordinalPosition,false,true);
}
Program: 13332
Project: 13332
Buggy source:
/** 
 * used to get custom analyzers, tokenizers, token-filters or char-filters with name ``name`` from crate-cluster-settings
 * @param name
 * @param type
 * @return a full settings instance for the thingy with given name and type or null if it does not exists
 */
private Settings getCustomThingy(String name,CustomType type){
  if (name == null) {
    return null;
  }
  String encodedSettings=clusterService.state().metaData().persistentSettings().get(String.format("String_Node_Str",SQLService.CUSTOM_ANALYSIS_SETTINGS_PREFIX,type.getName(),name));
  Settings decoded=null;
  if (encodedSettings != null) {
    try {
      decoded=decodeSettings(encodedSettings);
    }
 catch (    IOException e) {
    }
  }
  return decoded;
}

Fixed version (ground truth):
/** 
 * used to get custom analyzers, tokenizers, token-filters or char-filters with name ``name`` from crate-cluster-settings
 * @param name
 * @param type
 * @return a full settings instance for the thingy with given name and type or null if it does not exists
 */
private Settings getCustomThingy(String name,CustomType type){
  if (name == null) {
    return null;
  }
  String encodedSettings=clusterService.state().metaData().persistentSettings().get(String.format("String_Node_Str",SQLService.CUSTOM_ANALYSIS_SETTINGS_PREFIX,type.getName(),name));
  Settings decoded=null;
  if (encodedSettings != null) {
    try {
      decoded=decodeSettings(encodedSettings);
    }
 catch (    IOException e) {
      logger.warn("String_Node_Str",e,type.getName(),name);
    }
  }
  return decoded;
}
Program: 13333
Project: 13333
Buggy source:
public static Settings decodeSettings(String encodedSettings) throws IOException {
  BytesStreamInput bsi=new BytesStreamInput(encodedSettings.getBytes(),0,encodedSettings.getBytes().length,false);
  return ImmutableSettings.readSettingsFromStream(bsi);
}

Fixed version (ground truth):
public static Settings decodeSettings(String encodedSettings) throws IOException {
  Map<String,String> loaded=new JsonSettingsLoader().load(encodedSettings);
  return ImmutableSettings.builder().put(loaded).build();
}
Program: 13334
Project: 13334
Buggy source:
public static BytesReference encodeSettings(Settings settings) throws IOException {
  BytesStreamOutput bso=new BytesStreamOutput();
  ImmutableSettings.writeSettingsToStream(settings,bso);
  return bso.bytes();
}

Fixed version (ground truth):
public static BytesReference encodeSettings(Settings settings) throws IOException {
  BytesStreamOutput bso=new BytesStreamOutput();
  XContentBuilder builder=XContentFactory.jsonBuilder(bso);
  builder.startObject();
  for (  Map.Entry<String,String> entry : settings.getAsMap().entrySet()) {
    builder.field(entry.getKey(),entry.getValue());
  }
  builder.endObject();
  builder.flush();
  return bso.bytes();
}
Program: 13335
Project: 13335
Buggy source:
/** 
 * used to get custom analyzers, tokenizers, token-filters or char-filters with name ``name`` from crate-cluster-settings
 * @param name
 * @param type
 * @return a full settings instance for the thingy with given name and type or null if it does not exists
 */
private Settings getCustomThingy(String name,CustomType type){
  if (name == null) {
    return null;
  }
  String encodedSettings=clusterService.state().metaData().persistentSettings().get(String.format("String_Node_Str",SQLService.CUSTOM_ANALYSIS_SETTINGS_PREFIX,type.getName(),name));
  Settings decoded=null;
  if (encodedSettings != null) {
    try {
      decoded=decodeSettings(encodedSettings);
    }
 catch (    IOException e) {
    }
  }
  return decoded;
}

Fixed version (ground truth):
/** 
 * used to get custom analyzers, tokenizers, token-filters or char-filters with name ``name`` from crate-cluster-settings
 * @param name
 * @param type
 * @return a full settings instance for the thingy with given name and type or null if it does not exists
 */
private Settings getCustomThingy(String name,CustomType type){
  if (name == null) {
    return null;
  }
  String encodedSettings=clusterService.state().metaData().persistentSettings().get(String.format("String_Node_Str",SQLService.CUSTOM_ANALYSIS_SETTINGS_PREFIX,type.getName(),name));
  Settings decoded=null;
  if (encodedSettings != null) {
    try {
      decoded=decodeSettings(encodedSettings);
    }
 catch (    IOException e) {
      logger.warn("String_Node_Str",e,type.getName(),name);
    }
  }
  return decoded;
}
Program: 13336
Project: 13336
Buggy source:
public static Settings decodeSettings(String encodedSettings) throws IOException {
  BytesStreamInput bsi=new BytesStreamInput(encodedSettings.getBytes(),0,encodedSettings.getBytes().length,false);
  return ImmutableSettings.readSettingsFromStream(bsi);
}

Fixed version (ground truth):
public static Settings decodeSettings(String encodedSettings) throws IOException {
  Map<String,String> loaded=new JsonSettingsLoader().load(encodedSettings);
  return ImmutableSettings.builder().put(loaded).build();
}
Program: 13337
Project: 13337
Buggy source:
public static BytesReference encodeSettings(Settings settings) throws IOException {
  BytesStreamOutput bso=new BytesStreamOutput();
  ImmutableSettings.writeSettingsToStream(settings,bso);
  return bso.bytes();
}

Fixed version (ground truth):
public static BytesReference encodeSettings(Settings settings) throws IOException {
  BytesStreamOutput bso=new BytesStreamOutput();
  XContentBuilder builder=XContentFactory.jsonBuilder(bso);
  builder.startObject();
  for (  Map.Entry<String,String> entry : settings.getAsMap().entrySet()) {
    builder.field(entry.getKey(),entry.getValue());
  }
  builder.endObject();
  builder.flush();
  return bso.bytes();
}
Program: 13338
Project: 13338
Buggy source:
@Override public void index(ClusterState clusterState){
synchronized (indexLock) {
    try {
      if (!initialized()) {
        init();
      }
      indexWriter.deleteAll();
      doIndex(clusterState);
      searcherManager.maybeRefresh();
      IndexSearcher newIndexSearcher=searcherManager.acquire();
      if (activeSearches.getAndIncrement() == 0) {
        searcherManager.release(indexSearcher);
        indexSearcher=newIndexSearcher;
      }
    }
 catch (    IOException e) {
      throw new CrateException(e);
    }
  }
}

Fixed version (ground truth):
@Override public void index(ClusterState clusterState){
synchronized (indexLock) {
    try {
      if (!initialized()) {
        init();
      }
      indexWriter.deleteAll();
      doIndex(clusterState);
      searcherManager.maybeRefresh();
      if (activeSearches.get() == 0) {
        IndexSearcher newIndexSearcher=searcherManager.acquire();
        searcherManager.release(indexSearcher);
        indexSearcher=newIndexSearcher;
      }
    }
 catch (    IOException e) {
      throw new CrateException(e);
    }
  }
}
Program: 13339
Project: 13339
Buggy source:
@Override protected void doStop() throws ElasticSearchException {
}

Fixed version (ground truth):
@Override protected void doStop() throws ElasticSearchException {
  logger.info("String_Node_Str");
  clusterService.remove(listener);
}
Program: 13340
Project: 13340
Buggy source:
@Inject public InformationSchemaService(Settings settings,ClusterService clusterService){
  super(settings);
  this.clusterService=clusterService;
  this.dirty=false;
}

Fixed version (ground truth):
@Inject public InformationSchemaService(Settings settings,ClusterService clusterService){
  super(settings);
  this.clusterService=clusterService;
  this.dirty=false;
  logger=Loggers.getLogger(getClass(),settings);
}
Program: 13341
Project: 13341
Buggy source:
@Override protected void doStart() throws ElasticSearchException {
  clusterService.add(new ClusterStateListener(){
    @Override public void clusterChanged(    ClusterChangedEvent event){
      if (event.metaDataChanged()) {
synchronized (readLock) {
          dirty=true;
        }
      }
    }
  }
);
}

Fixed version (ground truth):
@Override protected void doStart() throws ElasticSearchException {
  logger.info("String_Node_Str");
  listener=new ClusterStateListener(){
    @Override public void clusterChanged(    ClusterChangedEvent event){
      if (event.metaDataChanged()) {
synchronized (readLock) {
          dirty=true;
        }
      }
    }
  }
;
  clusterService.add(listener);
}
Program: 13342
Project: 13342
Buggy source:
@Test public void testSearchInformationSchemaTablesRefresh() throws Exception {
  serviceSetup();
  exec("String_Node_Str");
  assertEquals(3L,response.rowCount());
  node.client().execute(SQLAction.INSTANCE,new SQLRequest("String_Node_Str")).actionGet();
  Thread.sleep(200);
  exec("String_Node_Str");
  assertEquals(4L,response.rowCount());
}

Fixed version (ground truth):
@Test public void testSearchInformationSchemaTablesRefresh() throws Exception {
  serviceSetup();
  exec("String_Node_Str");
  assertEquals(3L,response.rowCount());
  node.client().execute(SQLAction.INSTANCE,new SQLRequest("String_Node_Str")).actionGet();
  Thread.sleep(10);
  exec("String_Node_Str");
  assertEquals(4L,response.rowCount());
}
Program: 13343
Project: 13343
Buggy source:
@Test public void testSelectFromInformationSchemaTable() throws Exception {
  execUsingClient("String_Node_Str");
  assertEquals(0L,response.rowCount());
  execUsingClient("String_Node_Str");
  Thread.sleep(800);
  execUsingClient("String_Node_Str");
  assertEquals(1L,response.rowCount());
  assertEquals("String_Node_Str",response.rows()[0][0]);
  assertEquals(5,response.rows()[0][1]);
  assertEquals(1,response.rows()[0][2]);
}

Fixed version (ground truth):
@Test public void testSelectFromInformationSchemaTable() throws Exception {
  execUsingClient("String_Node_Str");
  assertEquals(0L,response.rowCount());
  execUsingClient("String_Node_Str");
  Thread.sleep(10);
  execUsingClient("String_Node_Str");
  assertEquals(1L,response.rowCount());
  assertEquals("String_Node_Str",response.rows()[0][0]);
  assertEquals(5,response.rows()[0][1]);
  assertEquals(1,response.rows()[0][2]);
}
Program: 13345
Project: 13345
Buggy source:
public GetRequest buildGetRequest(){
  String id=(String)getPlannerResult(QueryPlanner.PRIMARY_KEY_VALUE);
  GetRequest request=new GetRequest(indices.get(0),NodeExecutionContext.DEFAULT_TYPE,id);
  request.routing(id);
  request.fields(cols());
  return request;
}

Fixed version (ground truth):
public GetRequest buildGetRequest(){
  String id=(String)getPlannerResult(QueryPlanner.PRIMARY_KEY_VALUE);
  GetRequest request=new GetRequest(indices.get(0),NodeExecutionContext.DEFAULT_TYPE,id);
  request.routing(id);
  request.fields(cols());
  request.realtime(true);
  return request;
}
Program: 13346
Project: 13346
Buggy source:
public ParsedStatement(String stmt,Object[] args,NodeExecutionContext context) throws StandardException {
  this.stmt=stmt;
  this.args=args;
  this.context=context;
  this.plannerResults=new HashMap<String,Object>();
  SQLParser parser=new SQLParser();
  statementNode=parser.parseStatement(stmt);
switch (statementNode.getNodeType()) {
case NodeTypes.INSERT_NODE:
    visitor=new InsertVisitor(this);
  break;
default :
visitor=new QueryVisitor(this);
break;
}
statementNode.accept(visitor);
}

Fixed version (ground truth):
public ParsedStatement(String stmt,Object[] args,NodeExecutionContext context) throws StandardException {
  this.stmt=stmt;
  this.args=args;
  this.context=context;
  this.plannerResults=new HashMap<>();
  SQLParser parser=new SQLParser();
  statementNode=parser.parseStatement(stmt);
switch (statementNode.getNodeType()) {
case NodeTypes.INSERT_NODE:
    visitor=new InsertVisitor(this);
  break;
default :
visitor=new QueryVisitor(this);
break;
}
statementNode.accept(visitor);
}
Program: 13347
Project: 13347
Buggy source:
private SearchHit searchHitFromGetResponse(GetResponse getResponse){
  Map<String,SearchHitField> searchFields=new HashMap<String,SearchHitField>(getResponse.getFields().size());
  for (  Map.Entry<String,GetField> entry : getResponse.getFields().entrySet()) {
    searchFields.put(entry.getKey(),new InternalSearchHitField(entry.getKey(),entry.getValue().getValues()));
  }
  BytesReference source=null;
  if (getResponse.getSourceInternal() != null) {
    source=getResponse.getSourceAsBytesRef();
  }
  return new InternalSearchHit(0,getResponse.getId(),new StringAndBytesText(getResponse.getType()),source,searchFields);
}

Fixed version (ground truth):
/** 
 * build a SearchHit out of a GetResponse Apply DocumentMapping again as Realtime-GetRequests only fetch from source
 */
private SearchHit searchHitFromGetResponse(NodeExecutionContext.TableExecutionContext tableContext,GetResponse getResponse){
  Map<String,SearchHitField> searchFields=new HashMap<>(getResponse.getFields().size());
  for (  Map.Entry<String,GetField> entry : getResponse.getFields().entrySet()) {
    FieldMapper<?> mapper=tableContext.mapper().mappers().smartNameFieldMapper(entry.getKey());
    List<Object> searchFieldValues=new ArrayList<>(1);
    for (    Object value : entry.getValue().getValues()) {
      if (mapper instanceof DateFieldMapper) {
        searchFieldValues.add(mapper.valueForSearch(((DateFieldMapper)mapper).value(entry.getValue().getValue())));
      }
 else {
        searchFieldValues.add(mapper.valueForSearch(entry.getValue().getValue()));
      }
    }
    searchFields.put(entry.getKey(),new InternalSearchHitField(entry.getKey(),searchFieldValues));
  }
  BytesReference source=null;
  if (getResponse.getSourceInternal() != null) {
    source=getResponse.getSourceAsBytesRef();
  }
  return new InternalSearchHit(0,getResponse.getId(),new StringAndBytesText(getResponse.getType()),source,searchFields);
}
Program: 13348
Project: 13348
Buggy source:
public void applyGetResponse(GetResponse getResponse){
  this.hit=searchHitFromGetResponse(getResponse);
}

Fixed version (ground truth):
public void applyGetResponse(NodeExecutionContext.TableExecutionContext tableContext,GetResponse getResponse){
  this.hit=searchHitFromGetResponse(tableContext,getResponse);
}
Program: 13349
Project: 13349
Buggy source:
private List<FieldExtractor> getFieldExtractors(){
  List<FieldExtractor> extractors=new ArrayList<FieldExtractor>(fields.size());
  for (  Tuple<String,String> t : fields) {
    String fn=t.v2();
    FieldExtractor fc=null;
    if (fn.startsWith("String_Node_Str")) {
      if (fn.equals("String_Node_Str")) {
        fc=new SourceFieldExtractor();
      }
 else       if (fn.equals("String_Node_Str")) {
        fc=new FieldExtractor(){
          @Override public Object getValue(){
            return hit.getId();
          }
        }
;
      }
 else       if (fn.equals("String_Node_Str")) {
        fc=new FieldExtractor(){
          @Override public Object getValue(){
            return hit.getVersion();
          }
        }
;
      }
 else {
        fc=new HitFieldExtractor(fn);
      }
    }
 else {
      fc=new HitFieldExtractor(fn);
    }
    extractors.add(fc);
  }
  return extractors;
}

Fixed version (ground truth):
private List<FieldExtractor> getFieldExtractors(){
  List<FieldExtractor> extractors=new ArrayList<>(fields.size());
  for (  Tuple<String,String> t : fields) {
    String fn=t.v2();
    FieldExtractor fc=null;
    if (fn.startsWith("String_Node_Str")) {
      if (fn.equals("String_Node_Str")) {
        fc=new SourceFieldExtractor();
      }
 else       if (fn.equals("String_Node_Str")) {
        fc=new FieldExtractor(){
          @Override public Object getValue(){
            return hit.getId();
          }
        }
;
      }
 else       if (fn.equals("String_Node_Str")) {
        fc=new FieldExtractor(){
          @Override public Object getValue(){
            return hit.getVersion();
          }
        }
;
      }
 else {
        fc=new HitFieldExtractor(fn);
      }
    }
 else {
      fc=new HitFieldExtractor(fn);
    }
    extractors.add(fc);
  }
  return extractors;
}
Program: 13350
Project: 13350
Buggy source:
@Test public void testSqlRequestWithArgs() throws Exception {
  String json=sql("String_Node_Str" + "String_Node_Str" + "String_Node_Str"+ "String_Node_Str");
  JSONAssert.assertEquals("String_Node_Str" + "String_Node_Str" + "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str",json,true);
}

Fixed version (ground truth):
@Test public void testSqlRequestWithArgs() throws Exception {
  String json=sql("String_Node_Str" + "String_Node_Str" + "String_Node_Str"+ "String_Node_Str");
  JSONAssert.assertEquals("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",json,true);
}
Program: 13351
Project: 13351
Buggy source:
@Test public void testSqlRequest() throws Exception {
  String json=sql("String_Node_Str");
  JSONAssert.assertEquals("String_Node_Str" + "String_Node_Str" + "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str",json,true);
}

Fixed version (ground truth):
@Test public void testSqlRequest() throws Exception {
  String json=sql("String_Node_Str");
  JSONAssert.assertEquals("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",json,true);
}
Program: 13352
Project: 13352
Buggy source:
@Test public void testDeleteWithWhere() throws Exception {
  createIndex("String_Node_Str");
  client().prepareIndex("String_Node_Str","String_Node_Str","String_Node_Str").setSource("String_Node_Str").execute().actionGet();
  client().prepareIndex("String_Node_Str","String_Node_Str","String_Node_Str").setSource("String_Node_Str").execute().actionGet();
  client().prepareIndex("String_Node_Str","String_Node_Str","String_Node_Str").setSource("String_Node_Str").execute().actionGet();
  refresh();
  execute("String_Node_Str");
  assertEquals(0,response.rows().length);
  execute("String_Node_Str");
  assertEquals(2,response.rows().length);
}

Fixed version (ground truth):
@Test public void testDeleteWithWhere() throws Exception {
  createIndex("String_Node_Str");
  client().prepareIndex("String_Node_Str","String_Node_Str","String_Node_Str").setSource("String_Node_Str").execute().actionGet();
  client().prepareIndex("String_Node_Str","String_Node_Str","String_Node_Str").setSource("String_Node_Str").execute().actionGet();
  client().prepareIndex("String_Node_Str","String_Node_Str","String_Node_Str").setSource("String_Node_Str").execute().actionGet();
  refresh();
  execute("String_Node_Str");
  assertEquals(0,response.rows().length);
  refresh();
  execute("String_Node_Str");
  assertEquals(2,response.rows().length);
}
Program: 13353
Project: 13353
Buggy source:
/** 
 * Generates the path strings through iterating over the path elements
 * @throws StandardException
 */
private void generatePathStrings() throws StandardException {
  StringBuilder xcontentBuilder=new StringBuilder().append(getColumnName());
  StringBuilder sqlBuilder=new StringBuilder().append(getColumnName());
  for (  ValueNode node : path) {
    Object value=null;
    if (node instanceof CharConstantNode) {
      value=((CharConstantNode)node).getString();
      xcontentBuilder.append("String_Node_Str").append(value);
      sqlBuilder.append("String_Node_Str").append(value).append("String_Node_Str");
    }
 else     if (node instanceof NumericConstantNode) {
      value=((NumericConstantNode)node).getValue();
      xcontentBuilder.append("String_Node_Str").append(value).append("String_Node_Str");
      sqlBuilder.append("String_Node_Str").append(value).append("String_Node_Str");
      pathContainsNumeric=true;
    }
 else {
      throw new StandardException("String_Node_Str" + "String_Node_Str");
    }
  }
  sqlPathString=sqlBuilder.toString();
  xcontentPathString=xcontentBuilder.toString();
}

Fixed version (ground truth):
/** 
 * Generates the path strings by iterating over the path elements
 * @throws StandardException
 */
private void generatePathStrings() throws StandardException {
  StringBuilder xcontentBuilder=new StringBuilder().append(getColumnName());
  StringBuilder sqlBuilder=new StringBuilder().append(getColumnName());
  for (  ValueNode node : path) {
    Object value=null;
    if (node instanceof CharConstantNode) {
      value=((CharConstantNode)node).getString();
      xcontentBuilder.append("String_Node_Str").append(value);
      sqlBuilder.append("String_Node_Str").append(value).append("String_Node_Str");
    }
 else     if (node instanceof NumericConstantNode) {
      value=((NumericConstantNode)node).getValue();
      xcontentBuilder.append("String_Node_Str").append(value).append("String_Node_Str");
      sqlBuilder.append("String_Node_Str").append(value).append("String_Node_Str");
      pathContainsNumeric=true;
    }
 else {
      throw new StandardException("String_Node_Str" + "String_Node_Str");
    }
  }
  sqlPathString=sqlBuilder.toString();
  xcontentPathString=xcontentBuilder.toString();
}
Program: 13354
Project: 13354
Buggy source:
@Test public void testSelectNestedColumns() throws Exception {
  ESLogger logger=Loggers.getLogger("String_Node_Str");
  logger.setLevel("String_Node_Str");
  prepareCreate("String_Node_Str").addMapping("String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str").execute().actionGet();
  client().prepareIndex("String_Node_Str","String_Node_Str","String_Node_Str").setRefresh(true).setSource("String_Node_Str" + "String_Node_Str" + "String_Node_Str").execute().actionGet();
  execute("String_Node_Str" + "String_Node_Str");
  assertArrayEquals(new String[]{"String_Node_Str","String_Node_Str","String_Node_Str"},response.cols());
  assertEquals(1,response.rows().length);
  assertArrayEquals(new Object[]{"String_Node_Str","String_Node_Str",new ArrayList<String>(){
{
      add("String_Node_Str");
    }
  }
},response.rows()[0]);
}

Fixed version (ground truth):
@Test public void testSelectNestedColumns() throws Exception {
  prepareCreate("String_Node_Str").addMapping("String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str").execute().actionGet();
  client().prepareIndex("String_Node_Str","String_Node_Str","String_Node_Str").setRefresh(true).setSource("String_Node_Str" + "String_Node_Str" + "String_Node_Str").execute().actionGet();
  execute("String_Node_Str" + "String_Node_Str");
  assertArrayEquals(new String[]{"String_Node_Str","String_Node_Str","String_Node_Str"},response.cols());
  assertEquals(1,response.rows().length);
  assertArrayEquals(new Object[]{"String_Node_Str","String_Node_Str",new ArrayList<String>(){
{
      add("String_Node_Str");
    }
  }
},response.rows()[0]);
}
Program: 13355
Project: 13355
Buggy source:
@Override public void run(){
  swipeRefreshLayout.setRefreshing(true);
}

Fixed version (ground truth):
@Override public void run(){
  if (webView != null)   webView.destroy();
}
Program: 13356
Project: 13356
Buggy source:
@Override protected void onDestroy(){
  super.onDestroy();
  BroadCastManager.unregister(FinestWebViewActivity.this,key);
  if (webLayout != null) {
    webLayout.removeAllViews();
    webView.destroy();
  }
}

Fixed version (ground truth):
@Override protected void onDestroy(){
  super.onDestroy();
  BroadCastManager.unregister(FinestWebViewActivity.this,key);
  if (webLayout != null)   webLayout.removeAllViews();
  destroyWebView();
}
Program: 13357
Project: 13357
Buggy source:
@Override protected void onDestroy(){
  super.onDestroy();
  if (webView != null)   webView.destroy();
}

Fixed version (ground truth):
@Override protected void onDestroy(){
  super.onDestroy();
  if (webLayout != null) {
    webLayout.removeAllViews();
    webView.destroy();
  }
}
Program: 13358
Project: 13358
Buggy source:
protected void bindViews(){
  coordinatorLayout=(CoordinatorLayout)findViewById(R.id.coordinatorLayout);
  appBar=(AppBarLayout)findViewById(R.id.appBar);
  toolbar=(Toolbar)findViewById(R.id.toolbar);
  toolbarLayout=(RelativeLayout)findViewById(R.id.toolbarLayout);
  title=(TextView)findViewById(R.id.title);
  urlTv=(TextView)findViewById(R.id.url);
  close=(ImageButton)findViewById(R.id.close);
  back=(ImageButton)findViewById(R.id.back);
  forward=(ImageButton)findViewById(R.id.forward);
  more=(ImageButton)findViewById(R.id.more);
  swipeRefreshLayout=(SwipeRefreshLayout)findViewById(R.id.swipeRefreshLayout);
  webView=(WebView)findViewById(R.id.webView);
  gradient=findViewById(R.id.gradient);
  divider=findViewById(R.id.divider);
  progressBar=(ProgressBar)findViewById(R.id.progressBar);
  menuLayout=(RelativeLayout)findViewById(R.id.menuLayout);
  shadowLayout=(ShadowLayout)findViewById(R.id.shadowLayout);
  menuBackground=(LinearLayout)findViewById(R.id.menuBackground);
  menuRefresh=(LinearLayout)findViewById(R.id.menuRefresh);
  menuRefreshTv=(TextView)findViewById(R.id.menuRefreshTv);
  menuShareVia=(LinearLayout)findViewById(R.id.menuShareVia);
  menuShareViaTv=(TextView)findViewById(R.id.menuShareViaTv);
  menuCopyLink=(LinearLayout)findViewById(R.id.menuCopyLink);
  menuCopyLinkTv=(TextView)findViewById(R.id.menuCopyLinkTv);
  menuOpenWith=(LinearLayout)findViewById(R.id.menuOpenWith);
  menuOpenWithTv=(TextView)findViewById(R.id.menuOpenWithTv);
}

Fixed version (ground truth):
protected void bindViews(){
  coordinatorLayout=(CoordinatorLayout)findViewById(R.id.coordinatorLayout);
  appBar=(AppBarLayout)findViewById(R.id.appBar);
  toolbar=(Toolbar)findViewById(R.id.toolbar);
  toolbarLayout=(RelativeLayout)findViewById(R.id.toolbarLayout);
  title=(TextView)findViewById(R.id.title);
  urlTv=(TextView)findViewById(R.id.url);
  close=(ImageButton)findViewById(R.id.close);
  back=(ImageButton)findViewById(R.id.back);
  forward=(ImageButton)findViewById(R.id.forward);
  more=(ImageButton)findViewById(R.id.more);
  swipeRefreshLayout=(SwipeRefreshLayout)findViewById(R.id.swipeRefreshLayout);
  gradient=findViewById(R.id.gradient);
  divider=findViewById(R.id.divider);
  progressBar=(ProgressBar)findViewById(R.id.progressBar);
  menuLayout=(RelativeLayout)findViewById(R.id.menuLayout);
  shadowLayout=(ShadowLayout)findViewById(R.id.shadowLayout);
  menuBackground=(LinearLayout)findViewById(R.id.menuBackground);
  menuRefresh=(LinearLayout)findViewById(R.id.menuRefresh);
  menuRefreshTv=(TextView)findViewById(R.id.menuRefreshTv);
  menuShareVia=(LinearLayout)findViewById(R.id.menuShareVia);
  menuShareViaTv=(TextView)findViewById(R.id.menuShareViaTv);
  menuCopyLink=(LinearLayout)findViewById(R.id.menuCopyLink);
  menuCopyLinkTv=(TextView)findViewById(R.id.menuCopyLinkTv);
  menuOpenWith=(LinearLayout)findViewById(R.id.menuOpenWith);
  menuOpenWithTv=(TextView)findViewById(R.id.menuOpenWithTv);
  webLayout=(FrameLayout)findViewById(R.id.webLayout);
  webView=new WebView(getApplicationContext());
  webLayout.addView(webView);
}
Program: 13359
Project: 13359
Buggy source:
protected void updateIcon(ImageButton icon,@DrawableRes int drawableRes){
  VectorDrawableCompat drawable=(VectorDrawableCompat)ContextCompat.getDrawable(this,drawableRes);
  int[][] states=new int[][]{new int[]{-android.R.attr.state_enabled},new int[]{android.R.attr.state_pressed},new int[]{}};
  int[] colors=new int[]{iconDisabledColor,iconPressedColor,iconDefaultColor};
  ColorStateList colorStateList=new ColorStateList(states,colors);
  drawable.setTintList(colorStateList);
  icon.setImageDrawable(drawable);
}

Fixed version (ground truth):
protected void updateIcon(ImageButton icon,@DrawableRes int drawableRes){
  int[][] states=new int[][]{new int[]{-android.R.attr.state_enabled},new int[]{android.R.attr.state_pressed},new int[]{}};
  int[] colors=new int[]{iconDisabledColor,iconPressedColor,iconDefaultColor};
  ColorStateList colorStateList=new ColorStateList(states,colors);
  if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
    VectorDrawable drawable=(VectorDrawable)ContextCompat.getDrawable(this,drawableRes);
    drawable.setTintList(colorStateList);
    icon.setImageDrawable(drawable);
  }
 else {
    VectorDrawableCompat drawable=(VectorDrawableCompat)ContextCompat.getDrawable(this,drawableRes);
    drawable.setTintList(colorStateList);
    icon.setImageDrawable(drawable);
  }
}
Program: 13360
Project: 13360
Buggy source:
@Override public void onProgressChanged(WebView view,int progress){
  if (progress == 100)   progress=0;
  progressBar.setProgress(progress);
  if (showSwipeRefreshLayout) {
    if (swipeRefreshLayout.isRefreshing() && progress == 0) {
      swipeRefreshLayout.post(new Runnable(){
        @Override public void run(){
          swipeRefreshLayout.setRefreshing(false);
        }
      }
);
    }
    if (!swipeRefreshLayout.isRefreshing() && progress != 0) {
      swipeRefreshLayout.post(new Runnable(){
        @Override public void run(){
          swipeRefreshLayout.setRefreshing(true);
        }
      }
);
    }
  }
}

Fixed version (ground truth):
@Override public void onProgressChanged(WebView view,int progress){
  if (showSwipeRefreshLayout) {
    if (swipeRefreshLayout.isRefreshing() && progress == 100) {
      swipeRefreshLayout.post(new Runnable(){
        @Override public void run(){
          swipeRefreshLayout.setRefreshing(false);
        }
      }
);
    }
    if (!swipeRefreshLayout.isRefreshing() && progress != 100) {
      swipeRefreshLayout.post(new Runnable(){
        @Override public void run(){
          swipeRefreshLayout.setRefreshing(true);
        }
      }
);
    }
  }
  if (progress == 100)   progress=0;
  progressBar.setProgress(progress);
}
Program: 13365
Project: 13365
Buggy source:
@Override public void onDetach(){
  super.onDetach();
  mWebview.destroy();
}

Fixed version (ground truth):
@Override public void onDetach(){
  super.onDetach();
  mView.removeView(mWebview);
  mWebview.removeAllViews();
  mWebview.destroy();
}
Program: 13368
Project: 13368
Buggy source:
@Override public void onMessageReceived(RemoteMessage message){
  Map data=message.getData();
  AppLog.v(T.NOTIFS,"String_Node_Str");
  if (data == null) {
    AppLog.v(T.NOTIFS,"String_Node_Str");
    return;
  }
  if (!mAccountStore.hasAccessToken()) {
    return;
  }
  if (PUSH_TYPE_ZENDESK.equals(String.valueOf(data.get("String_Node_Str")))) {
    NOTIFICATION_HELPER.handleZendeskNotification(this);
  }
  synchronizedHandleDefaultPush(data);
}

Fixed version (ground truth):
@Override public void onMessageReceived(RemoteMessage message){
  Map data=message.getData();
  AppLog.v(T.NOTIFS,"String_Node_Str");
  if (data == null) {
    AppLog.v(T.NOTIFS,"String_Node_Str");
    return;
  }
  if (!mAccountStore.hasAccessToken()) {
    return;
  }
  if (PUSH_TYPE_ZENDESK.equals(String.valueOf(data.get("String_Node_Str")))) {
    String zendeskRequestId=String.valueOf(data.get(PUSH_ARG_ZENDESK_REQUEST_ID));
    if (!mZendeskHelper.refreshRequest(this,zendeskRequestId)) {
      NOTIFICATION_HELPER.handleZendeskNotification(this);
    }
  }
  synchronizedHandleDefaultPush(data);
}
Program: 13369
Project: 13369
Buggy source:
private void setCurrentTag(final ReaderTag tag){
  if (tag == null) {
    return;
  }
  if (isCurrentTag(tag) && hasPostAdapter() && getPostAdapter().isCurrentTag(tag)) {
    return;
  }
  mCurrentTag=tag;
switch (getPostListType()) {
case TAG_FOLLOWED:
    AppPrefs.setReaderTag(tag);
  break;
case TAG_PREVIEW:
mTagPreviewHistory.push(tag.getTagSlug());
break;
case BLOG_PREVIEW:
break;
case SEARCH_RESULTS:
break;
}
getPostAdapter().setCurrentTag(tag);
hideNewPostsBar();
showLoadingProgress(false);
updateCurrentTagIfTime();
}

Fixed version (ground truth):
private void setCurrentTag(final ReaderTag tag){
  if (tag == null) {
    return;
  }
  if (isCurrentTag(tag) && hasPostAdapter() && getPostAdapter().isCurrentTag(tag)) {
    return;
  }
  mCurrentTag=tag;
switch (getPostListType()) {
case TAG_FOLLOWED:
    AppPrefs.setReaderTag(tag);
  break;
case TAG_PREVIEW:
mTagPreviewHistory.push(tag.getTagSlug());
break;
case BLOG_PREVIEW:
case SEARCH_RESULTS:
break;
}
getPostAdapter().setCurrentTag(tag);
hideNewPostsBar();
showLoadingProgress(false);
updateCurrentTagIfTime();
}
Program: 13370
Project: 13370
Buggy source:
/** 
 * Converts the entire log to plain text
 * @param context
 * @return The log as plain text
 */
public static synchronized String toPlainText(Context context){
  StringBuilder sb=new StringBuilder();
  sb.append(getAppInfoHeaderText(context)).append("String_Node_Str").append(getDeviceInfoHeaderText(context)).append("String_Node_Str");
  Iterator<LogEntry> it=mLogEntries.iterator();
  int lineNum=1;
  while (it.hasNext()) {
    LogEntry entry=it.next();
    sb.append(format(Locale.US,"String_Node_Str",lineNum)).append("String_Node_Str").append(entry.formatLogDate()).append("String_Node_Str").append(entry.mLogTag.name()).append("String_Node_Str").append(entry.mLogText).append("String_Node_Str");
    lineNum++;
  }
  return sb.toString();
}

Fixed version (ground truth):
/** 
 * Converts the entire log to plain text
 * @param context
 * @return The log as plain text
 */
public static synchronized String toPlainText(Context context){
  StringBuilder sb=new StringBuilder();
  sb.append(getAppInfoHeaderText(context)).append("String_Node_Str").append(getDeviceInfoHeaderText(context)).append("String_Node_Str");
  Iterator<LogEntry> it=new ArrayList<>(mLogEntries).iterator();
  int lineNum=1;
  while (it.hasNext()) {
    LogEntry entry=it.next();
    sb.append(format(Locale.US,"String_Node_Str",lineNum)).append("String_Node_Str").append(entry.formatLogDate()).append("String_Node_Str").append(entry.mLogTag.name()).append("String_Node_Str").append(entry.mLogText).append("String_Node_Str");
    lineNum++;
  }
  return sb.toString();
}
Program: 13371
Project: 13371
Buggy source:
/** 
 * Returns entire log as html for display (see AppLogViewerActivity)
 * @param context
 * @return Arraylist of Strings containing log messages
 */
public static ArrayList<String> toHtmlList(Context context){
  ArrayList<String> items=new ArrayList<String>();
  items.add("String_Node_Str" + getAppInfoHeaderText(context) + "String_Node_Str");
  items.add("String_Node_Str" + getDeviceInfoHeaderText(context) + "String_Node_Str");
  Iterator<LogEntry> it=mLogEntries.iterator();
  while (it.hasNext()) {
    items.add(it.next().toHtml());
  }
  return items;
}

Fixed version (ground truth):
/** 
 * Returns entire log as html for display (see AppLogViewerActivity)
 * @param context
 * @return Arraylist of Strings containing log messages
 */
public static ArrayList<String> toHtmlList(Context context){
  ArrayList<String> items=new ArrayList<String>();
  items.add("String_Node_Str" + getAppInfoHeaderText(context) + "String_Node_Str");
  items.add("String_Node_Str" + getDeviceInfoHeaderText(context) + "String_Node_Str");
  Iterator<LogEntry> it=new ArrayList<>(mLogEntries).iterator();
  while (it.hasNext()) {
    items.add(it.next().toHtml());
  }
  return items;
}
Program: 13372
Project: 13372
Buggy source:
@SuppressWarnings("String_Node_Str") @Subscribe(threadMode=ThreadMode.MAIN) public void onAuthenticationChanged(OnAuthenticationChanged event){
  if (event.isError()) {
    if (mSelectedSite != null && event.error.type == AuthenticationErrorType.INVALID_TOKEN) {
      AuthenticationDialogUtils.showAuthErrorView(this,mSiteStore,mSelectedSite);
    }
    return;
  }
  if (mAccountStore.hasAccessToken()) {
    AnalyticsTracker.track(AnalyticsTracker.Stat.SIGNED_IN);
    GCMRegistrationIntentService.enqueueWork(this,new Intent(this,GCMRegistrationIntentService.class));
    if (mIsMagicLinkLogin) {
      if (mIsMagicLinkSignup) {
        AppPrefs.setShouldTrackMagicLinkSignup(true);
        mDispatcher.dispatch(AccountActionBuilder.newFetchAccountAction());
        if (mJetpackConnectSource != null) {
          ActivityLauncher.continueJetpackConnect(this,mJetpackConnectSource,mSelectedSite);
        }
 else {
          ActivityLauncher.showSignupEpilogue(this,null,null,null,null,true);
        }
      }
 else {
        mLoginAnalyticsListener.trackLoginMagicLinkSucceeded();
        if (mJetpackConnectSource != null) {
          ActivityLauncher.continueJetpackConnect(this,mJetpackConnectSource,mSelectedSite);
        }
 else {
          ActivityLauncher.showLoginEpilogue(this,true,getIntent().getIntegerArrayListExtra(ARG_OLD_SITES_IDS));
        }
      }
    }
  }
}

Fixed version (ground truth):
@SuppressWarnings("String_Node_Str") @Subscribe(threadMode=ThreadMode.MAIN) public void onAuthenticationChanged(OnAuthenticationChanged event){
  if (event.isError()) {
    if (mSelectedSite != null && event.error.type == AuthenticationErrorType.INVALID_TOKEN) {
      AuthenticationDialogUtils.showAuthErrorView(this,mSiteStore,mSelectedSite);
    }
    return;
  }
  if (mAccountStore.hasAccessToken()) {
    AnalyticsTracker.track(AnalyticsTracker.Stat.SIGNED_IN);
    if (mIsMagicLinkLogin) {
      if (mIsMagicLinkSignup) {
        AppPrefs.setShouldTrackMagicLinkSignup(true);
        mDispatcher.dispatch(AccountActionBuilder.newFetchAccountAction());
        if (mJetpackConnectSource != null) {
          ActivityLauncher.continueJetpackConnect(this,mJetpackConnectSource,mSelectedSite);
        }
 else {
          ActivityLauncher.showSignupEpilogue(this,null,null,null,null,true);
        }
      }
 else {
        mLoginAnalyticsListener.trackLoginMagicLinkSucceeded();
        if (mJetpackConnectSource != null) {
          ActivityLauncher.continueJetpackConnect(this,mJetpackConnectSource,mSelectedSite);
        }
 else {
          ActivityLauncher.showLoginEpilogue(this,true,getIntent().getIntegerArrayListExtra(ARG_OLD_SITES_IDS));
        }
      }
    }
  }
}