nus-yam/ex-repair huggingface dataset:
Program: 38209
Project: 38209
Buggy source:
/** 
 * Creates a list of Annotation objects from a list of annotation labels.
 * @param labels the list of labels.
 * @return will return a list with all the annotations with valid labels. Ifthe list with labels is empty or none of the labels are valid, then it will return null.
 * @throws SQLException if the query does not succeed.
 */
public List<Annotation> getAnnotationObject(List<String> labels) throws SQLException {
  List<Annotation> annotations=null;
  Annotation annotation=null;
  for (  String label : labels) {
    annotation=getAnnotationObject(label);
    if (annotation != null) {
      if (annotations == null) {
        annotations=new ArrayList<Annotation>();
      }
      annotations.add(annotation);
    }
  }
  return annotations;
}

Fixed version (ground truth):
/** 
 * Creates an Annotation object from an annotation label.
 * @param label the name of the annotation to create the object for.
 * @return the Annotation object. If the label does not exist, then nullwill be returned.
 * @throws SQLException if the query does not succeed.
 */
public Annotation getAnnotationObject(String label) throws SQLException {
  String query="String_Node_Str" + "String_Node_Str" + "String_Node_Str"+ "String_Node_Str";
  PreparedStatement stmt=conn.prepareStatement(query);
  stmt.setString(1,label);
  ResultSet rs=stmt.executeQuery();
  if (rs.next()) {
    return new Annotation(rs);
  }
 else {
    return null;
  }
}
Program: 38210
Project: 38210
Buggy source:
@Test public void shouldGetNullWhenSendingInEmptyList() throws Exception {
  List<String> labels=new ArrayList<String>();
  List<Annotation> annotations=dbac.getAnnotationObject(labels);
  assertEquals(null,annotations);
}

Fixed version (ground truth):
@Test public void shouldGetNullWhenSendingInEmptyList() throws Exception {
  List<String> labels=new ArrayList<String>();
  List<Annotation> annotations=dbac.getAnnotationObjects(labels);
  assertEquals(null,annotations);
}
Program: 38211
Project: 38211
Buggy source:
@Test public void shouldBeAbleToGetMultipleAnnotations() throws Exception {
  List<String> labels=new ArrayList<String>();
  labels.add("String_Node_Str");
  labels.add("String_Node_Str");
  List<Annotation> annotations=dbac.getAnnotationObject(labels);
  assertEquals("String_Node_Str",annotations.get(0).label);
  assertEquals("String_Node_Str",annotations.get(1).label);
}

Fixed version (ground truth):
@Test public void shouldBeAbleToGetMultipleAnnotations() throws Exception {
  List<String> labels=new ArrayList<String>();
  labels.add("String_Node_Str");
  labels.add("String_Node_Str");
  List<Annotation> annotations=dbac.getAnnotationObjects(labels);
  assertEquals("String_Node_Str",annotations.get(0).label);
  assertEquals("String_Node_Str",annotations.get(1).label);
}
Program: 38212
Project: 38212
Buggy source:
@Test public void shouldGetAnnotationsWhenMixingValidWithInvalidLabels() throws Exception {
  List<String> labels=new ArrayList<String>();
  labels.add("String_Node_Str");
  labels.add("String_Node_Str");
  labels.add("String_Node_Str");
  labels.add("String_Node_Str");
  List<Annotation> annotations=dbac.getAnnotationObject(labels);
  assertTrue(annotations.size() == 2);
  assertEquals("String_Node_Str",annotations.get(0).label);
  assertEquals("String_Node_Str",annotations.get(1).label);
}

Fixed version (ground truth):
@Test public void shouldGetAnnotationsWhenMixingValidWithInvalidLabels() throws Exception {
  List<String> labels=new ArrayList<String>();
  labels.add("String_Node_Str");
  labels.add("String_Node_Str");
  labels.add("String_Node_Str");
  labels.add("String_Node_Str");
  List<Annotation> annotations=dbac.getAnnotationObjects(labels);
  assertTrue(annotations.size() == 2);
  assertEquals("String_Node_Str",annotations.get(0).label);
  assertEquals("String_Node_Str",annotations.get(1).label);
}
Program: 38213
Project: 38213
Buggy source:
@Before public void setUp(){
  final GsonBuilder builder=new GsonBuilder();
  builder.excludeFieldsWithoutExposeAnnotation();
  gson=builder.create();
}

Fixed version (ground truth):
/** 
 * Setup method to initiate gson builder.
 */
@Before public void setUp(){
  final GsonBuilder builder=new GsonBuilder();
  builder.excludeFieldsWithoutExposeAnnotation();
  gson=builder.create();
}
Program: 38214
Project: 38214
Buggy source:
/** 
 * Adds all attributes an arraylist and pass that and the experimentID to the database. A filepath is returned and sent to the client as a URL.
 */
@Override public Response execute(){
  System.out.println("String_Node_Str" + metaData);
  DatabaseAccessor accessor=null;
  String response_url=null;
  try {
    accessor=new DatabaseAccessor(DatabaseSettings.username,DatabaseSettings.password,DatabaseSettings.host,DatabaseSettings.database);
    response_url=accessor.addFileURL(type,fileName,metaData,author,uploader,false,experimentID,grVersion);
    return new AddFileToExperimentResponse(StatusCode.OK,response_url);
  }
 catch (  SQLException e) {
    e.printStackTrace();
  }
  return new MinimalResponse(StatusCode.BAD_REQUEST);
}

Fixed version (ground truth):
/** 
 * Adds all attributes an arraylist and pass that and the experimentID to the database. A filepath is returned and sent to the client as a URL.
 */
@Override public Response execute(){
  DatabaseAccessor accessor=null;
  String response_url=null;
  try {
    accessor=new DatabaseAccessor(DatabaseSettings.username,DatabaseSettings.password,DatabaseSettings.host,DatabaseSettings.database);
    response_url=accessor.addFileURL(type,fileName,metaData,author,uploader,false,experimentID,grVersion);
    return new AddFileToExperimentResponse(StatusCode.OK,response_url);
  }
 catch (  SQLException e) {
    e.printStackTrace();
  }
  return new MinimalResponse(StatusCode.BAD_REQUEST);
}
Program: 38216
Project: 38216
Buggy source:
private void exchange(HttpExchange exchange,CommandType type){
  InputStream bodyStream=exchange.getRequestBody();
  Scanner scanner=new Scanner(bodyStream);
  String body="String_Node_Str";
  String uuid=null;
  String username=null;
  System.out.println("String_Node_Str" + type);
  if (type != CommandType.LOGIN_COMMAND) {
    try {
      uuid=exchange.getRequestHeaders().get("String_Node_Str").get(0);
    }
 catch (    NullPointerException e) {
      System.out.println("String_Node_Str");
      Response errorResponse=new MinimalResponse(StatusCode.UNAUTHORIZED);
      try {
        respond(exchange,errorResponse);
      }
 catch (      IOException e1) {
        e1.printStackTrace();
      }
      scanner.close();
      return;
    }
  }
 else {
    System.out.println("String_Node_Str");
  }
  while (scanner.hasNext()) {
    body=body.concat(scanner.next());
  }
  scanner.close();
  Response response=null;
  try {
    username=Authenticate.getUsername(uuid);
  }
 catch (  Exception e) {
    e.printStackTrace();
  }
  System.out.println("String_Node_Str" + body);
  System.out.println("String_Node_Str");
  try {
    response=commandHandler.processNewCommand(body,exchange.getRequestURI().toString(),username,type);
  }
 catch (  Exception e) {
    e.printStackTrace();
  }
  System.out.println("String_Node_Str");
  try {
    respond(exchange,response);
  }
 catch (  IOException e) {
    e.printStackTrace();
  }
}

Fixed version (ground truth):
private void exchange(HttpExchange exchange,CommandType type){
  InputStream bodyStream=exchange.getRequestBody();
  Scanner scanner=new Scanner(bodyStream);
  String body="String_Node_Str";
  String uuid=null;
  String username=null;
  System.out.println("String_Node_Str" + type);
  if (type != CommandType.LOGIN_COMMAND) {
    try {
      uuid=exchange.getRequestHeaders().get("String_Node_Str").get(0);
    }
 catch (    NullPointerException e) {
      System.out.println("String_Node_Str");
      Response errorResponse=new MinimalResponse(StatusCode.UNAUTHORIZED);
      try {
        respond(exchange,errorResponse);
      }
 catch (      IOException e1) {
        e1.printStackTrace();
      }
      scanner.close();
      return;
    }
  }
 else {
    System.out.println("String_Node_Str");
  }
  while (scanner.hasNext()) {
    body=body.concat("String_Node_Str" + scanner.next());
  }
  scanner.close();
  Response response=null;
  try {
    username=Authenticate.getUsername(uuid);
  }
 catch (  Exception e) {
    e.printStackTrace();
  }
  System.out.println("String_Node_Str" + body);
  System.out.println("String_Node_Str");
  try {
    response=commandHandler.processNewCommand(body,exchange.getRequestURI().toString(),username,type);
  }
 catch (  Exception e) {
    e.printStackTrace();
  }
  System.out.println("String_Node_Str");
  try {
    respond(exchange,response);
  }
 catch (  IOException e) {
    e.printStackTrace();
  }
}
Program: 38217
Project: 38217
Buggy source:
/** 
 * Method used to validate all attributes.
 */
@Override public boolean validate(){
  if (name == null || type == null || defaults == null || forced == null) {
    return false;
  }
  if (name.length() > 10 || type.length < 1) {
    return false;
  }
  return true;
}

Fixed version (ground truth):
/** 
 * Method used to validate all attributes.
 */
@Override public boolean validate(){
  if (name == null || type == null || defaults == null || forced == null) {
    return false;
  }
  if (name.length() > 10 || type.size() < 1) {
    return false;
  }
  return true;
}
Program: 38218
Project: 38218
Buggy source:
/** 
 * Runs the actual code needed to search the database.
 */
@Override public Response execute(){
  DatabaseAccessor db=null;
  List<Experiment> searchResult=null;
  try {
    db=new DatabaseAccessor(DatabaseSettings.database,DatabaseSettings.password,DatabaseSettings.host,DatabaseSettings.database);
    searchResult=db.search(annotations);
  }
 catch (  SQLException e) {
    return new MinimalResponse(StatusCode.SERVICE_UNAVAILABLE);
  }
catch (  IOException e) {
    return new MinimalResponse(StatusCode.BAD_REQUEST);
  }
  SearchResponse response=new SearchResponse(searchResult);
  return response;
}

Fixed version (ground truth):
/** 
 * Runs the actual code needed to search the database.
 */
@Override public Response execute(){
  DatabaseAccessor db=null;
  List<Experiment> searchResult=null;
  try {
    db=new DatabaseAccessor(DatabaseSettings.username,DatabaseSettings.password,DatabaseSettings.host,DatabaseSettings.database);
    searchResult=db.search(annotations);
  }
 catch (  SQLException e) {
    return new MinimalResponse(StatusCode.SERVICE_UNAVAILABLE);
  }
catch (  IOException e) {
    return new MinimalResponse(StatusCode.BAD_REQUEST);
  }
  SearchResponse response=new SearchResponse(searchResult);
  return response;
}
Program: 38220
Project: 38220
Buggy source:
public String toString(){
  String returnstring="String_Node_Str" + id + "String_Node_Str"+ name+ "String_Node_Str"+ forced+ "String_Node_Str";
  for (int i=0; i < values.size(); i++) {
    returnstring=returnstring + "String_Node_Str" + values.get(i)+ "String_Node_Str";
  }
  return returnstring;
}

Fixed version (ground truth):
public String toString(){
  String returnstring="String_Node_Str" + id + "String_Node_Str"+ name+ "String_Node_Str"+ forced+ "String_Node_Str";
  if (values != null) {
    for (int i=0; i < values.size(); i++) {
      returnstring=returnstring + "String_Node_Str" + values.get(i)+ "String_Node_Str";
    }
  }
  return returnstring;
}
Program: 38221
Project: 38221
Buggy source:
static public String getID(String username){
  Iterator<String> keys=activeUsersID.keySet().iterator();
  String key;
  while (keys.hasNext()) {
    key=activeUsersID.get(keys.next());
    if (key.equals(username)) {
      return key;
    }
  }
  return null;
}

Fixed version (ground truth):
static public String getID(String username){
  Iterator<String> keys=activeUsersID.keySet().iterator();
  String key=null;
  String temp_username;
  while (keys.hasNext()) {
    key=keys.next();
    temp_username=activeUsersID.get(key);
    if (temp_username.equals(username)) {
      return key;
    }
  }
  return null;
}
Program: 38222
Project: 38222
Buggy source:
/** 
 * Used to create the command needed for retrieving experiments.
 * @param json string to initiate class.
 * @param restful tag to put into class.
 * @return the actual command.
 */
public Command createRetrieveExperimentCommand(String json,String restful){
  return new GetExperimentCommand();
}

Fixed version (ground truth):
/** 
 * Used to create the command needed for retrieving experiments.
 * @param json string to initiate class.
 * @param restful tag to put into class.
 * @return the actual command.
 */
public Command createRetrieveExperimentCommand(String json,String restful){
  return null;
}
Program: 38223
Project: 38223
Buggy source:
/** 
 * Used to create the command needed for converting raw to profile.
 * @param json string to initiate class.
 * @param restful tag to put into class.
 * @param uuid
 * @return the actual command.
 */
public Command createProcessCommand(String json,String[] restful,String uuid){
  ProcessCommand processCommand=gson.fromJson(json,ProcessCommand.class);
  processCommand.setProcessType(restful[2]);
  processCommand.setFileID(restful[3]);
  processCommand.setUserID(uuid);
  return processCommand;
}

Fixed version (ground truth):
/** 
 * Used to create the command needed for converting raw to profile.
 * @param json string to initiate class.
 * @param restful tag to put into class.
 * @param uuid
 * @return the actual command.
 */
public Command createProcessCommand(String json,String restful,String uuid){
  ProcessCommand processCommand=gson.fromJson(json,ProcessCommand.class);
  processCommand.setUserID(uuid);
  return processCommand;
}
Program: 38224
Project: 38224
Buggy source:
public Doorman(CommandHandler commandHandler,int port) throws IOException {
  this.commandHandler=commandHandler;
  httpServer=HttpServer.create(new InetSocketAddress(port),0);
  httpServer.createContext("String_Node_Str",createHandler());
  httpServer.createContext("String_Node_Str",createHandler());
  httpServer.createContext("String_Node_Str",createHandler());
  httpServer.createContext("String_Node_Str",createHandler());
  httpServer.createContext("String_Node_Str",createHandler());
  httpServer.createContext("String_Node_Str",createHandler());
  httpServer.createContext("String_Node_Str",createHandler());
  httpServer.setExecutor(new Executor(){
    @Override public void execute(    Runnable command){
      new Thread(command).start();
    }
  }
);
}

Fixed version (ground truth):
public Doorman(CommandHandler commandHandler,int port) throws IOException {
  this.commandHandler=commandHandler;
  httpServer=HttpServer.create(new InetSocketAddress(port),0);
  httpServer.createContext("String_Node_Str",createHandler());
  httpServer.createContext("String_Node_Str",createHandler());
  httpServer.createContext("String_Node_Str",createHandler());
  httpServer.createContext("String_Node_Str",createHandler());
  httpServer.createContext("String_Node_Str",createHandler());
  httpServer.createContext("String_Node_Str",createHandler());
  httpServer.createContext("String_Node_Str",createHandler());
  httpServer.createContext("String_Node_Str",createHandler());
  httpServer.setExecutor(new Executor(){
    @Override public void execute(    Runnable command){
      new Thread(command).start();
    }
  }
);
}
Program: 38226
Project: 38226
Buggy source:
@Test public void testSearchByPubMed(){
  String searchPubMed="String_Node_Str";
  SearchResult queryRes=new SearchResult();
  PreparedStatement pStatement;
  String query="String_Node_Str" + "String_Node_Str";
  PubMedParser theParser=new PubMedParser();
  ParsedPubMed queryMaterial=theParser.parsePubMed(searchPubMed);
  query=query + queryMaterial.getWhereString() + "String_Node_Str";
  System.out.println("String_Node_Str" + query + "String_Node_Str");
  try {
    pStatement=dbCon.prepareStatement(query);
    for (int i=1; i <= queryMaterial.getValues().size(); i++) {
      pStatement.setString(i,queryMaterial.getValues().get(i - 1));
    }
    ResultSet res=pStatement.executeQuery();
    queryRes.setResultData(res);
    ArrayList<String> result=queryRes.getRowValues(0);
    ArrayList<String> resultHeader=queryRes.getColHeaders();
    for (int i=0; i < resultHeader.size(); i++) {
      System.out.print(resultHeader.get(i) + "String_Node_Str");
    }
    System.out.println("String_Node_Str");
    for (int i=0; i < result.size(); i++) {
      System.out.print(result.get(i) + "String_Node_Str");
    }
  }
 catch (  SQLException e) {
    System.out.println("String_Node_Str");
  }
}

Fixed version (ground truth):
@Test public void testSearchByPubMed(){
  String searchPubMed="String_Node_Str";
  SearchResult queryRes=new SearchResult();
  PreparedStatement pStatement;
  String query="String_Node_Str" + "String_Node_Str";
  PubMedParser theParser=new PubMedParser();
  ParsedPubMed queryMaterial=theParser.parsePubMed(searchPubMed);
  query=query + queryMaterial.getWhereString() + "String_Node_Str";
  System.out.println("String_Node_Str" + query + "String_Node_Str");
  try {
    pStatement=dbCon.prepareStatement(query);
    for (int i=1; i <= queryMaterial.getValues().size(); i++) {
      pStatement.setString(i,queryMaterial.getValues().get(i - 1));
    }
    ResultSet res=pStatement.executeQuery();
    queryRes.setResultData(res);
    ArrayList<String> result=queryRes.getRowValues(0);
    ArrayList<String> resultHeader=queryRes.getColHeaders();
    for (int i=0; i < resultHeader.size(); i++) {
      System.out.print(resultHeader.get(i) + "String_Node_Str");
    }
    System.out.println("String_Node_Str");
    if (result != null) {
      for (int i=0; i < result.size(); i++) {
        System.out.print(result.get(i) + "String_Node_Str");
      }
    }
  }
 catch (  SQLException e) {
    System.out.println("String_Node_Str");
  }
}
Program: 38227
Project: 38227
Buggy source:
/** 
 * Returns the values of a row. Parameters: row number
 * @param int rowNr
 * @return ArrayList<String>
 */
public ArrayList<String> getRowValues(int rowNr){
  ArrayList<String> valuesList=new ArrayList<String>();
  HashMap<String,String> rowData=resultList.get(rowNr);
  for (int i=0; i < nameList.size(); i++) {
    valuesList.add(rowData.get(nameList.get(i)));
  }
  return valuesList;
}

Fixed version (ground truth):
/** 
 * Returns the values of a row. Parameters: row number
 * @param int rowNr
 * @return ArrayList<String> or null if failed.
 */
public ArrayList<String> getRowValues(int rowNr){
  ArrayList<String> valuesList=new ArrayList<String>();
  if (rowCount > 0) {
    HashMap<String,String> rowData=resultList.get(rowNr);
    for (int i=0; i < nameList.size(); i++) {
      valuesList.add(rowData.get(nameList.get(i)));
    }
    return valuesList;
  }
  return null;
}
Program: 38228
Project: 38228
Buggy source:
public static void main(String args[]){
  System.out.println("String_Node_Str");
  final GsonBuilder builder=new GsonBuilder();
  builder.excludeFieldsWithoutExposeAnnotation();
  final Gson gson=builder.create();
  CommandHandler cmdh=new CommandHandler();
  CommandType cmdt=CommandType.LOGIN_COMMAND;
  String json="String_Node_Str";
  String restful="String_Node_Str";
  Response rsp=cmdh.doStuff(json,restful,cmdt);
  if (rsp == null) {
    System.out.println("String_Node_Str");
  }
 else {
    System.out.println("String_Node_Str");
  }
}

Fixed version (ground truth):
public static void main(String args[]){
  System.out.println("String_Node_Str");
  final GsonBuilder builder=new GsonBuilder();
  builder.excludeFieldsWithoutExposeAnnotation();
  final Gson gson=builder.create();
  CommandHandler cmdh=new CommandHandler();
  CommandType cmdt=CommandType.LOGIN_COMMAND;
  String json="String_Node_Str";
  String restful="String_Node_Str";
  String uuid="String_Node_Str";
  Response rsp=cmdh.doStuff(json,restful,uuid,cmdt);
  if (rsp == null) {
    System.out.println("String_Node_Str");
  }
 else {
    System.out.println("String_Node_Str");
  }
}
Program: 38229
Project: 38229
Buggy source:
public void loadPaintingGui(){
  try {
    ResourceLocation loc=new ResourceLocation("String_Node_Str" + ConfigurationHandler.instance.texture + "String_Node_Str");
    InputStream in=Minecraft.getMinecraft().getResourceManager().getResource(loc).getInputStream();
    BufferedReader reader=new BufferedReader(new InputStreamReader(in));
    Gson gson=new Gson();
    JsonElement je=gson.fromJson(reader,JsonElement.class);
    JsonObject json=je.getAsJsonObject();
    PaintingsPatternLoader loader=gson.fromJson(json,PaintingsPatternLoader.class);
    loader.loadPatterns();
  }
 catch (  IOException e) {
    FMLLog.log.warn(e.getLocalizedMessage());
  }
  try {
    Class altClass=Class.forName(CLASS_LOC);
    paintingGuiTextureHelper(altClass,"String_Node_Str",new ResourceLocation("String_Node_Str" + ConfigurationHandler.instance.texture + "String_Node_Str"));
    paintingGuiHelper(altClass,"String_Node_Str",(int)RenderPaintingLate.getSize());
    paintingGuiHelper(altClass,"String_Node_Str",(int)RenderPaintingLate.getSize());
  }
 catch (  Exception e) {
  }
}

Fixed version (ground truth):
public void loadPaintingGui(){
  try {
    ResourceLocation loc=new ResourceLocation("String_Node_Str" + ConfigurationHandler.instance.texture + "String_Node_Str");
    InputStream in=Minecraft.getMinecraft().getResourceManager().getResource(loc).getInputStream();
    BufferedReader reader=new BufferedReader(new InputStreamReader(in));
    Gson gson=new Gson();
    JsonElement je=gson.fromJson(reader,JsonElement.class);
    JsonObject json=je.getAsJsonObject();
    PaintingsPatternLoader loader=gson.fromJson(json,PaintingsPatternLoader.class);
    PaintingsIgnore.ignoreVanillaPaintings();
    loader.loadPatterns();
  }
 catch (  IOException e) {
    FMLLog.log.warn(e.getLocalizedMessage());
  }
  try {
    Class altClass=Class.forName(CLASS_LOC);
    paintingGuiTextureHelper(altClass,"String_Node_Str",new ResourceLocation("String_Node_Str" + ConfigurationHandler.instance.texture + "String_Node_Str"));
    paintingGuiHelper(altClass,"String_Node_Str",(int)RenderPaintingLate.getSize());
    paintingGuiHelper(altClass,"String_Node_Str",(int)RenderPaintingLate.getSize());
  }
 catch (  Exception e) {
    FMLLog.log.error(e);
  }
}
Program: 38230
Project: 38230
Buggy source:
public void loadPatterns() throws IllegalFormatException {
  Integer width=this.pattern[0].length();
  Integer height=this.pattern.length;
  try {
    for (int offsetY=0; offsetY < height; offsetY++) {
      for (int offsetX=0; offsetX < width; offsetX++) {
        String symbol=this.pattern[offsetY].substring(offsetX,offsetX + 1);
        if (symbol.equals("String_Node_Str")) {
          continue;
        }
        HashMap size=this.key.get(symbol);
        if (size != null) {
          Integer sizeX=this.key.get(symbol).get("String_Node_Str");
          Integer sizeY=this.key.get(symbol).get("String_Node_Str");
          this.addPatternSection(sizeX,sizeY,offsetX,offsetY);
          this.updatePattern(sizeX,sizeY,offsetX,offsetY);
        }
 else {
          StringBuilder error=new StringBuilder();
          error.append(String.format("String_Node_Str",offsetX,offsetY));
          error.append("String_Node_Str");
          for (int i=0; i < this.pattern.length; i++) {
            error.append(String.format("String_Node_Str",this.pattern[i]));
          }
          error.append(String.format("String_Node_Str",this.key.toString()));
          FMLLog.log.error(error);
        }
      }
    }
  }
 catch (  Exception e) {
    FMLLog.log.error(e);
  }
}

Fixed version (ground truth):
public void loadPatterns() throws IllegalFormatException {
  Integer width=this.pattern[0].length();
  Integer height=this.pattern.length;
  try {
    for (int offsetY=0; offsetY < height; offsetY++) {
      for (int offsetX=0; offsetX < width; offsetX++) {
        String symbol=this.pattern[offsetY].substring(offsetX,offsetX + 1);
        if (symbol.equals("String_Node_Str")) {
          continue;
        }
        HashMap size=this.key.get(symbol);
        if (size != null) {
          Integer sizeX=this.key.get(symbol).get("String_Node_Str");
          Integer sizeY=this.key.get(symbol).get("String_Node_Str");
          FMLLog.log.debug(String.format("String_Node_Str",sizeX,sizeY,offsetX,offsetY));
          this.addPatternSection(sizeX,sizeY,offsetX,offsetY);
          this.updatePattern(sizeX,sizeY,offsetX,offsetY);
        }
 else {
          StringBuilder error=new StringBuilder();
          error.append(String.format("String_Node_Str",offsetX,offsetY));
          error.append("String_Node_Str");
          for (int i=0; i < this.pattern.length; i++) {
            error.append(String.format("String_Node_Str",this.pattern[i]));
          }
          error.append(String.format("String_Node_Str",this.key.toString()));
          FMLLog.log.error(error);
        }
      }
    }
  }
 catch (  Exception e) {
    FMLLog.log.error(e);
  }
}
Program: 38232
Project: 38232
Buggy source:
@Override public void onComplete(TaskResult rs){
  if (rs.code == TaskResult.CODE_ERROR) {
    Toast.makeText(getApplicationContext(),R.string.error_submit,Toast.LENGTH_LONG).show();
    downloadCaptcha();
  }
 else   if (rs.code == TaskResult.CODE_SUCCESS) {
    NotificationManager notificationManager=(NotificationManager)getApplicationContext().getSystemService(getApplicationContext().NOTIFICATION_SERVICE);
    notificationManager.cancel(Aero.NOTIFICATION_ID);
    Toast.makeText(getApplicationContext(),R.string.success,Toast.LENGTH_LONG).show();
    State.turnOnDataConnection(false,getApplicationContext());
    int restartDelay=Integer.parseInt(sharedPref.getString("String_Node_Str","String_Node_Str"));
    new Handler().postDelayed(new Runnable(){
      public void run(){
        State.turnOnDataConnection(true,getApplicationContext());
      }
    }
,restartDelay);
  }
}

Fixed version (ground truth):
@Override public void onComplete(TaskResult rs){
  if (rs.code == TaskResult.CODE_ERROR) {
    Log.e(TAG,rs.message);
    Toast.makeText(getApplicationContext(),R.string.error_submit,Toast.LENGTH_LONG).show();
    downloadCaptcha();
  }
 else   if (rs.code == TaskResult.CODE_SUCCESS) {
    NotificationManager notificationManager=(NotificationManager)getApplicationContext().getSystemService(getApplicationContext().NOTIFICATION_SERVICE);
    notificationManager.cancel(Aero.NOTIFICATION_ID);
    Toast.makeText(getApplicationContext(),R.string.success,Toast.LENGTH_LONG).show();
    State.turnOnDataConnection(false,getApplicationContext());
    int restartDelay=Integer.parseInt(sharedPref.getString("String_Node_Str","String_Node_Str"));
    new Handler().postDelayed(new Runnable(){
      public void run(){
        State.turnOnDataConnection(true,getApplicationContext());
      }
    }
,restartDelay);
  }
}
Program: 38233
Project: 38233
Buggy source:
/** 
 * Initiates the fetch operation. 
 */
public String parseInputStream(InputStream stream) throws IOException {
  String str;
  try {
    BufferedReader r=new BufferedReader(new InputStreamReader(stream));
    StringBuilder total=new StringBuilder();
    String line;
    while ((line=r.readLine()) != null) {
      total.append(line);
    }
    str=total.toString();
  }
  finally {
    if (stream != null) {
      stream.close();
    }
  }
  return str;
}

Fixed version (ground truth):
/** 
 * Initiates the fetch operation. 
 */
public String parseInputStream(InputStream stream) throws IOException {
  String str;
  try {
    BufferedReader r=new BufferedReader(new InputStreamReader(stream));
    StringBuilder total=new StringBuilder();
    String line;
    while ((line=r.readLine()) != null) {
      total.append(line);
    }
    str=total.toString();
    Log.e("String_Node_Str",str);
  }
  finally {
    if (stream != null) {
      stream.close();
    }
  }
  return str;
}
Program: 38234
Project: 38234
Buggy source:
@Override public TaskResult parse(InputStream in){
  TaskResult result=new TaskResult();
  String message="String_Node_Str";
  try {
    String str=parseInputStream(in);
    Log.e("String_Node_Str",str);
    Pattern jsonPattern=Pattern.compile("String_Node_Str");
    Matcher jsonMatcher=jsonPattern.matcher(str);
    if (jsonMatcher.find()) {
      JSONObject json=new JSONObject(jsonMatcher.group(1));
      result.setResultData(json);
      result.code=TaskResult.CODE_SUCCESS;
    }
    if (str.indexOf("String_Node_Str") != -1) {
      result.message="String_Node_Str";
      result.code=TaskResult.CODE_ERROR;
    }
    if (str.indexOf("String_Node_Str") != -1) {
      result.code=TaskResult.CODE_SUCCESS;
    }
  }
 catch (  Exception e) {
    result.message=e.getMessage();
    result.code=TaskResult.CODE_ERROR;
  }
  return result;
}

Fixed version (ground truth):
@Override public TaskResult parse(InputStream in){
  TaskResult result=new TaskResult();
  result.code=TaskResult.CODE_ERROR;
  result.message="String_Node_Str";
  try {
    String str=parseInputStream(in);
    Pattern jsonPattern=Pattern.compile("String_Node_Str");
    Matcher jsonMatcher=jsonPattern.matcher(str);
    if (jsonMatcher.find()) {
      JSONObject json=new JSONObject(jsonMatcher.group(1));
      result.setResultData(json);
      result.code=TaskResult.CODE_SUCCESS;
    }
    if (str.indexOf("String_Node_Str") != -1) {
      result.message="String_Node_Str";
    }
    if (str.indexOf("String_Node_Str") != -1) {
      result.code=TaskResult.CODE_SUCCESS;
    }
  }
 catch (  Exception e) {
    result.message=e.getMessage();
  }
  return result;
}
Program: 38235
Project: 38235
Buggy source:
@Override public void onEnable(){
  setupPermissions();
  File backupDir=new File("String_Node_Str".concat(FILE_SEPARATOR).concat("String_Node_Str"));
  if (!backupDir.exists())   backupDir.mkdirs();
  backupDir=new File("String_Node_Str");
  if (!backupDir.exists())   backupDir.mkdirs();
  backupDir=new File("String_Node_Str".concat(FILE_SEPARATOR).concat("String_Node_Str"));
  if (!backupDir.exists())   backupDir.mkdirs();
  PropertiesSystem pSystem=new PropertiesSystem(this);
  Server server=getServer();
  PluginManager pm=server.getPluginManager();
  run=new PrepareBackupTask(server,pSystem);
  pm.registerEvent(Type.PLAYER_COMMAND_PREPROCESS,new CommandListener(run,pSystem,this),Priority.Normal,this);
  if (pSystem.getBooleanProperty(BOOL_BACKUP_ONLY_PLAYER)) {
    LoginListener ll=new LoginListener(this,pSystem);
    pm.registerEvent(Type.PLAYER_LOGIN,ll,Priority.Normal,this);
    pm.registerEvent(Type.PLAYER_QUIT,ll,Priority.Normal,this);
  }
  int intervall=pSystem.getIntProperty(INT_BACKUP_INTERVALL);
  server.getScheduler().scheduleSyncRepeatingTask(this,run,intervall,intervall);
  System.out.println(this.getDescription().getFullName() + "String_Node_Str");
}

Fixed version (ground truth):
@Override public void onEnable(){
  setupPermissions();
  File backupDir=new File("String_Node_Str".concat(FILE_SEPARATOR).concat("String_Node_Str"));
  if (!backupDir.exists())   backupDir.mkdirs();
  backupDir=new File("String_Node_Str");
  if (!backupDir.exists())   backupDir.mkdirs();
  backupDir=new File("String_Node_Str".concat(FILE_SEPARATOR).concat("String_Node_Str"));
  if (!backupDir.exists())   backupDir.mkdirs();
  PropertiesSystem pSystem=new PropertiesSystem(this);
  Server server=getServer();
  PluginManager pm=server.getPluginManager();
  run=new PrepareBackupTask(server,pSystem);
  pm.registerEvent(Type.PLAYER_COMMAND_PREPROCESS,new CommandListener(run,pSystem,this),Priority.Normal,this);
  if (pSystem.getBooleanProperty(BOOL_BACKUP_ONLY_PLAYER)) {
    LoginListener ll=new LoginListener(this,pSystem);
    pm.registerEvent(Type.PLAYER_LOGIN,ll,Priority.Normal,this);
    pm.registerEvent(Type.PLAYER_QUIT,ll,Priority.Normal,this);
  }
  int intervall=pSystem.getIntProperty(INT_BACKUP_INTERVALL);
  if (intervall != -1)   server.getScheduler().scheduleSyncRepeatingTask(this,run,intervall,intervall);
 else   System.out.println("String_Node_Str");
  System.out.println(this.getDescription().getFullName() + "String_Node_Str");
}
Program: 38236
Project: 38236
Buggy source:
/** 
 * Check whethere there are more backups as allowed to store. When this case is true, it deletes oldest ones
 */
private void deleteOldBackups(){
  try {
    File backupDir=new File(pSystem.getStringProperty(STRING_BACKUP_FOLDER));
    File[] tempArray=backupDir.listFiles();
    final int maxBackups=pSystem.getIntProperty(INT_MAX_BACKUPS);
    if (tempArray.length > maxBackups) {
      System.out.println("String_Node_Str");
      ArrayList<File> backups=new ArrayList<File>(tempArray.length);
      backups.addAll(Arrays.asList(tempArray));
      int maxModifiedIndex;
      long maxModified;
      for (int i=0; i < maxBackups; ++i) {
        maxModifiedIndex=0;
        maxModified=backups.get(0).lastModified();
        for (int j=1; j < backups.size(); ++j) {
          File currentFile=backups.get(j);
          if (currentFile.lastModified() > maxModified) {
            maxModified=currentFile.lastModified();
            maxModifiedIndex=j;
          }
        }
        backups.remove(maxModifiedIndex);
      }
      System.out.println("String_Node_Str");
      System.out.println(Arrays.toString(backups.toArray()));
      for (      File backupToDelete : backups)       backupToDelete.delete();
    }
  }
 catch (  Exception e) {
    e.printStackTrace(System.out);
  }
}

Fixed version (ground truth):
/** 
 * Check whethere there are more backups as allowed to store. When this case is true, it deletes oldest ones
 */
private void deleteOldBackups(){
  try {
    File backupDir=new File(pSystem.getStringProperty(STRING_BACKUP_FOLDER));
    File[] tempArray=backupDir.listFiles();
    File[] array=new File[tempArray.length - 1];
    for (int i=0, j=0; i < tempArray.length; ++i) {
      File file=tempArray[i];
      if (file.isDirectory() && file.getName().equals("String_Node_Str"))       continue;
      array[j++]=tempArray[i];
    }
    tempArray=array;
    final int maxBackups=pSystem.getIntProperty(INT_MAX_BACKUPS);
    if (tempArray.length > maxBackups) {
      System.out.println("String_Node_Str");
      ArrayList<File> backups=new ArrayList<File>(tempArray.length);
      backups.addAll(Arrays.asList(tempArray));
      int maxModifiedIndex;
      long maxModified;
      for (int i=0; i < maxBackups; ++i) {
        maxModifiedIndex=0;
        maxModified=backups.get(0).lastModified();
        for (int j=1; j < backups.size(); ++j) {
          File currentFile=backups.get(j);
          if (currentFile.lastModified() > maxModified) {
            maxModified=currentFile.lastModified();
            maxModifiedIndex=j;
          }
        }
        backups.remove(maxModifiedIndex);
      }
      System.out.println("String_Node_Str");
      System.out.println(Arrays.toString(backups.toArray()));
      for (      File backupToDelete : backups)       backupToDelete.delete();
    }
  }
 catch (  Exception e) {
    e.printStackTrace(System.out);
  }
}
Program: 38238
Project: 38238
Buggy source:
@Override public void performVerboseAction(){
  super.performVerboseAction();
  if (DEBUG_MEMORY) {
    DEBUG_MEM_COUNTER++;
    if (DEBUG_MEM_COUNTER % DEBUG_MEM_INTERVAL == 0) {
      DEBUG_MEM_COUNTER=0;
      ReferenceCleanser.clearSoftCaches();
      System.err.println(flowGraph.spaceReport());
      System.err.println("String_Node_Str");
      HeapTracer.traceHeap(Collections.singleton(this),true);
      System.err.println("String_Node_Str");
    }
  }
  if (getFixedPointSystem() instanceof VerboseAction) {
    ((VerboseAction)getFixedPointSystem()).performVerboseAction();
  }
  AbstractStatement s=workList.takeStatement();
  System.err.println(printRHSInstances(s));
  workList.insertStatement(s);
  System.err.println("String_Node_Str" + cg.getNumberOfNodes());
}

Fixed version (ground truth):
@Override public void performVerboseAction(){
  super.performVerboseAction();
  if (DEBUG_MEMORY) {
    DEBUG_MEM_COUNTER++;
    if (DEBUG_MEM_COUNTER % DEBUG_MEM_INTERVAL == 0) {
      DEBUG_MEM_COUNTER=0;
      ReferenceCleanser.clearSoftCaches();
      System.err.println(flowGraph.spaceReport());
      System.err.println("String_Node_Str");
      HeapTracer.traceHeap(Collections.singleton(this),true);
      System.err.println("String_Node_Str");
    }
  }
  if (getFixedPointSystem() instanceof VerboseAction) {
    ((VerboseAction)getFixedPointSystem()).performVerboseAction();
  }
  if (!workList.isEmpty()) {
    AbstractStatement s=workList.takeStatement();
    System.err.println(printRHSInstances(s));
    workList.insertStatement(s);
    System.err.println("String_Node_Str" + cg.getNumberOfNodes());
  }
}
Program: 38239
Project: 38239
Buggy source:
public CAstNode translateDoLoop(CAstNode loopTest,CAstNode loopBody,CAstNode continueNode,CAstNode breakNode,WalkContext<?,?> wc){
  if (replicateForDoLoops) {
    loopBody=Ast.makeNode(CAstNode.BLOCK_STMT,loopBody,continueNode);
    CAstRewriter.Rewrite x=(new CAstCloner(Ast,false)).copy(loopBody,wc.cfg(),wc.pos(),wc.getNodeTypeMap(),null);
    CAstNode otherBody=x.newRoot();
    wc.cfg().addAll(x.newCfg());
    wc.pos().addAll(x.newPos());
    wc.getNodeTypeMap().addAll(x.newTypes());
    return Ast.makeNode(CAstNode.BLOCK_STMT,loopBody,Ast.makeNode(CAstNode.LOOP,loopTest,otherBody),breakNode);
  }
 else {
    CAstNode header=Ast.makeNode(CAstNode.EMPTY);
    CAstNode loopGoto=Ast.makeNode(CAstNode.IFGOTO,loopTest);
    wc.cfg().map(header,header);
    wc.cfg().map(loopGoto,loopGoto);
    wc.cfg().add(loopGoto,header,Boolean.TRUE);
    return Ast.makeNode(CAstNode.BLOCK_STMT,header,Ast.makeNode(CAstNode.BLOCK_STMT,loopBody,continueNode),loopGoto,breakNode);
  }
}

Fixed version (ground truth):
public CAstNode translateDoLoop(CAstNode loopTest,CAstNode loopBody,CAstNode continueNode,CAstNode breakNode,WalkContext<?,?> wc){
  if (replicateForDoLoops) {
    loopBody=Ast.makeNode(CAstNode.BLOCK_STMT,loopBody,continueNode);
    CAstRewriter.Rewrite x=(new CAstCloner(Ast,false)).copy(loopBody,wc.cfg(),wc.pos(),wc.getNodeTypeMap(),null);
    CAstNode otherBody=x.newRoot();
    wc.cfg().addAll(x.newCfg());
    wc.pos().addAll(x.newPos());
    wc.getNodeTypeMap().addAll(x.newTypes());
    return Ast.makeNode(CAstNode.BLOCK_STMT,loopBody,Ast.makeNode(CAstNode.LOOP,loopTest,otherBody),breakNode);
  }
 else {
    CAstNode header=Ast.makeNode(CAstNode.LABEL_STMT,Ast.makeConstant("String_Node_Str"),Ast.makeNode(CAstNode.EMPTY));
    CAstNode loopGoto=Ast.makeNode(CAstNode.IFGOTO,loopTest);
    wc.cfg().map(header,header);
    wc.cfg().map(loopGoto,loopGoto);
    wc.cfg().add(loopGoto,header,Boolean.TRUE);
    return Ast.makeNode(CAstNode.BLOCK_STMT,header,Ast.makeNode(CAstNode.BLOCK_STMT,loopBody,continueNode),loopGoto,breakNode);
  }
}
Program: 38242
Project: 38242
Buggy source:
@Override public SSAAbstractInvokeInstruction addDirectCall(int function,int[] params,CallSiteReference site){
  CallSiteReference newSite=new JSCallSiteReference(statements.size());
  JavaScriptInvoke s=new JavaScriptInvoke(function,nextLocal++,params,nextLocal++,newSite);
  statements.add(s);
  return s;
}

Fixed version (ground truth):
@Override public SSAAbstractInvokeInstruction addDirectCall(int function,int[] params,CallSiteReference site){
  CallSiteReference newSite=new JSCallSiteReference(statements.size());
  JavaScriptInvoke s=new JavaScriptInvoke(statements.size(),function,nextLocal++,params,nextLocal++,newSite);
  statements.add(s);
  return s;
}
Program: 38243
Project: 38243
Buggy source:
private int passActualPropertyValsAsParams(JSInstructionFactory insts,int nargs,JavaScriptSummary S,int[] paramsToPassToInvoked){
  int curValNum=nargs + 2;
  for (int i=1; i < paramsToPassToInvoked.length; i++) {
    final int constVN=curValNum++;
    S.addConstant(constVN,new ConstantValue(i - 1));
    int propertyReadResult=curValNum++;
    S.addStatement(insts.PropertyRead(S.getNextProgramCounter(),propertyReadResult,4,constVN));
    paramsToPassToInvoked[i]=propertyReadResult;
  }
  return curValNum;
}

Fixed version (ground truth):
private int passActualPropertyValsAsParams(JSInstructionFactory insts,int nargs,JavaScriptSummary S,int[] paramsToPassToInvoked){
  int curValNum=nargs + 2;
  for (int i=1; i < paramsToPassToInvoked.length; i++) {
    final int constVN=curValNum++;
    S.addConstant(constVN,new ConstantValue(i - 1));
    int propertyReadResult=curValNum++;
    S.addStatement(insts.PropertyRead(S.getNumberOfStatements(),propertyReadResult,4,constVN));
    S.getNextProgramCounter();
    paramsToPassToInvoked[i]=propertyReadResult;
  }
  return curValNum;
}
Program: 38244
Project: 38244
Buggy source:
private IR makeIRForArgList(CGNode node){
  MethodReference ref=node.getMethod().getReference();
  IClass declaringClass=node.getMethod().getDeclaringClass();
  JSInstructionFactory insts=(JSInstructionFactory)declaringClass.getClassLoader().getInstructionFactory();
  int nargs=4;
  JavaScriptSummary S=new JavaScriptSummary(ref,nargs);
  int numParamsToPass=10;
  int[] paramsToPassToInvoked=new int[numParamsToPass + 1];
  paramsToPassToInvoked[0]=3;
  int curValNum=passActualPropertyValsAsParams(insts,nargs,S,paramsToPassToInvoked);
  CallSiteReference cs=new JSCallSiteReference(S.getNextProgramCounter());
  int resultVal=curValNum++;
  int excVal=curValNum++;
  S.addStatement(insts.Invoke(S.getNextProgramCounter(),2,resultVal,paramsToPassToInvoked,excVal,cs));
  S.addStatement(insts.ReturnInstruction(S.getNextProgramCounter(),resultVal,false));
  JavaScriptSummarizedFunction t=new JavaScriptSummarizedFunction(ref,S,declaringClass);
  return t.makeIR(node.getContext(),null);
}

Fixed version (ground truth):
private IR makeIRForArgList(CGNode node){
  MethodReference ref=node.getMethod().getReference();
  IClass declaringClass=node.getMethod().getDeclaringClass();
  JSInstructionFactory insts=(JSInstructionFactory)declaringClass.getClassLoader().getInstructionFactory();
  int nargs=4;
  JavaScriptSummary S=new JavaScriptSummary(ref,nargs);
  int numParamsToPass=10;
  int[] paramsToPassToInvoked=new int[numParamsToPass + 1];
  paramsToPassToInvoked[0]=3;
  int curValNum=passActualPropertyValsAsParams(insts,nargs,S,paramsToPassToInvoked);
  CallSiteReference cs=new JSCallSiteReference(S.getNextProgramCounter());
  int resultVal=curValNum++;
  int excVal=curValNum++;
  S.addStatement(insts.Invoke(S.getNumberOfStatements(),2,resultVal,paramsToPassToInvoked,excVal,cs));
  S.getNextProgramCounter();
  S.addStatement(insts.ReturnInstruction(S.getNumberOfStatements(),resultVal,false));
  S.getNextProgramCounter();
  JavaScriptSummarizedFunction t=new JavaScriptSummarizedFunction(ref,S,declaringClass);
  return t.makeIR(node.getContext(),null);
}
Program: 38245
Project: 38245
Buggy source:
private IR makeIRForNoArgList(CGNode node){
  MethodReference ref=node.getMethod().getReference();
  IClass declaringClass=node.getMethod().getDeclaringClass();
  JSInstructionFactory insts=(JSInstructionFactory)declaringClass.getClassLoader().getInstructionFactory();
  int nargs=4;
  JavaScriptSummary S=new JavaScriptSummary(ref,nargs);
  int resultVal=nargs + 2;
  CallSiteReference cs=new JSCallSiteReference(S.getNextProgramCounter());
  int[] params=new int[1];
  params[0]=3;
  S.addStatement(insts.Invoke(S.getNextProgramCounter(),2,resultVal,params,resultVal + 1,cs));
  S.addStatement(insts.ReturnInstruction(S.getNextProgramCounter(),resultVal,false));
  JavaScriptSummarizedFunction t=new JavaScriptSummarizedFunction(ref,S,declaringClass);
  return t.makeIR(node.getContext(),null);
}

Fixed version (ground truth):
private IR makeIRForNoArgList(CGNode node){
  MethodReference ref=node.getMethod().getReference();
  IClass declaringClass=node.getMethod().getDeclaringClass();
  JSInstructionFactory insts=(JSInstructionFactory)declaringClass.getClassLoader().getInstructionFactory();
  int nargs=4;
  JavaScriptSummary S=new JavaScriptSummary(ref,nargs);
  int resultVal=nargs + 2;
  CallSiteReference cs=new JSCallSiteReference(S.getNextProgramCounter());
  int[] params=new int[1];
  params[0]=3;
  S.addStatement(insts.Invoke(S.getNumberOfStatements(),2,resultVal,params,resultVal + 1,cs));
  S.getNextProgramCounter();
  S.addStatement(insts.ReturnInstruction(S.getNumberOfStatements(),resultVal,false));
  S.getNextProgramCounter();
  JavaScriptSummarizedFunction t=new JavaScriptSummarizedFunction(ref,S,declaringClass);
  return t.makeIR(node.getContext(),null);
}
Program: 38246
Project: 38246
Buggy source:
@SuppressWarnings("String_Node_Str") private int passArbitraryPropertyValAsParams(JSInstructionFactory insts,int nargs,JavaScriptSummary S,int[] paramsToPassToInvoked){
  int curValNum=nargs + 2;
  int eachElementGetResult=curValNum++;
  S.addStatement(insts.EachElementGetInstruction(S.getNextProgramCounter(),eachElementGetResult,4));
  int propertyReadResult=curValNum++;
  S.addStatement(insts.PropertyRead(S.getNextProgramCounter(),propertyReadResult,4,eachElementGetResult));
  for (int i=1; i < paramsToPassToInvoked.length; i++) {
    paramsToPassToInvoked[i]=propertyReadResult;
  }
  return curValNum;
}

Fixed version (ground truth):
@SuppressWarnings("String_Node_Str") private int passArbitraryPropertyValAsParams(JSInstructionFactory insts,int nargs,JavaScriptSummary S,int[] paramsToPassToInvoked){
  int curValNum=nargs + 2;
  int eachElementGetResult=curValNum++;
  S.addStatement(insts.EachElementGetInstruction(S.getNumberOfStatements(),eachElementGetResult,4));
  S.getNextProgramCounter();
  int propertyReadResult=curValNum++;
  S.addStatement(insts.PropertyRead(S.getNumberOfStatements(),propertyReadResult,4,eachElementGetResult));
  S.getNextProgramCounter();
  for (int i=1; i < paramsToPassToInvoked.length; i++) {
    paramsToPassToInvoked[i]=propertyReadResult;
  }
  return curValNum;
}
Program: 38248
Project: 38248
Buggy source:
private IMethod makeUnaryNumberCall(IClass cls){
  JSInstructionFactory insts=(JSInstructionFactory)cls.getClassLoader().getInstructionFactory();
  MethodReference ref=AstMethodReference.fnReference(JavaScriptTypes.Number);
  JavaScriptSummary S=new JavaScriptSummary(ref,2);
  S.addStatement(insts.GetInstruction(S.getNumberOfStatements(),4,2,"String_Node_Str"));
  S.getNextProgramCounter();
  CallSiteReference cs=new JSCallSiteReference(S.getNextProgramCounter());
  S.addStatement(insts.Invoke(4,5,new int[]{2},6,cs));
  S.addStatement(insts.ReturnInstruction(S.getNumberOfStatements(),5,false));
  S.getNextProgramCounter();
  return new JavaScriptConstructor(ref,S,cls,cha.lookupClass(JavaScriptTypes.Number));
}

Fixed version (ground truth):
private IMethod makeUnaryNumberCall(IClass cls){
  JSInstructionFactory insts=(JSInstructionFactory)cls.getClassLoader().getInstructionFactory();
  MethodReference ref=AstMethodReference.fnReference(JavaScriptTypes.Number);
  JavaScriptSummary S=new JavaScriptSummary(ref,2);
  S.addStatement(insts.GetInstruction(S.getNumberOfStatements(),4,2,"String_Node_Str"));
  S.getNextProgramCounter();
  CallSiteReference cs=new JSCallSiteReference(S.getNextProgramCounter());
  S.addStatement(insts.Invoke(S.getNumberOfStatements(),4,5,new int[]{2},6,cs));
  S.addStatement(insts.ReturnInstruction(S.getNumberOfStatements(),5,false));
  S.getNextProgramCounter();
  return new JavaScriptConstructor(ref,S,cls,cha.lookupClass(JavaScriptTypes.Number));
}
Program: 38249
Project: 38249
Buggy source:
private IMethod makeUnaryStringCall(IClass cls){
  JSInstructionFactory insts=(JSInstructionFactory)cls.getClassLoader().getInstructionFactory();
  MethodReference ref=AstMethodReference.fnReference(JavaScriptTypes.String);
  JavaScriptSummary S=new JavaScriptSummary(ref,2);
  S.addStatement(insts.GetInstruction(S.getNumberOfStatements(),4,2,"String_Node_Str"));
  S.getNextProgramCounter();
  CallSiteReference cs=new JSCallSiteReference(S.getNextProgramCounter());
  S.addStatement(insts.Invoke(4,5,new int[]{2},6,cs));
  S.addStatement(insts.ReturnInstruction(S.getNumberOfStatements(),5,false));
  S.getNextProgramCounter();
  return new JavaScriptConstructor(ref,S,cls,cha.lookupClass(JavaScriptTypes.String));
}

Fixed version (ground truth):
private IMethod makeUnaryStringCall(IClass cls){
  JSInstructionFactory insts=(JSInstructionFactory)cls.getClassLoader().getInstructionFactory();
  MethodReference ref=AstMethodReference.fnReference(JavaScriptTypes.String);
  JavaScriptSummary S=new JavaScriptSummary(ref,2);
  S.addStatement(insts.GetInstruction(S.getNumberOfStatements(),4,2,"String_Node_Str"));
  S.getNextProgramCounter();
  CallSiteReference cs=new JSCallSiteReference(S.getNextProgramCounter());
  S.addStatement(insts.Invoke(S.getNumberOfStatements(),4,5,new int[]{2},6,cs));
  S.addStatement(insts.ReturnInstruction(S.getNumberOfStatements(),5,false));
  S.getNextProgramCounter();
  return new JavaScriptConstructor(ref,S,cls,cha.lookupClass(JavaScriptTypes.String));
}