nus-yam/ex-repair huggingface dataset:
Program: 175785
Project: 175785
Buggy source:
@Override public boolean onOptionsItemSelected(MenuItem item){
switch (item.getItemId()) {
case R.id.leaveRoom:
    leaveRoom(roomId);
  break;
case R.id.aboutRoom:
roominfo(roomId);
break;
case R.id.favourite:
addtofav(roomId);
break;
case R.id.markRead:
markRed(roomId);
break;
}
return super.onOptionsItemSelected(item);
}

Fixed version (ground truth):
@Override public boolean onOptionsItemSelected(MenuItem item){
switch (item.getItemId()) {
case R.id.leaveRoom:
    leaveRoom(roomId);
  break;
case R.id.aboutRoom:
roominfo(roomId);
break;
case R.id.favourite:
addtofav(roomId);
break;
case R.id.markRead:
markRed(roomId);
break;
case android.R.id.home:
onBackPressed();
break;
}
return super.onOptionsItemSelected(item);
}
Program: 175786
Project: 175786
Buggy source:
@Override public int getItemCount(){
  Log.e("String_Node_Str","String_Node_Str" + messages.size());
  return messages.size();
}

Fixed version (ground truth):
@Override public int getItemCount(){
  return messages.size();
}
Program: 175787
Project: 175787
Buggy source:
@Override public void onBindViewHolder(final MessagesAdapter.MyViewHolder myViewHolder,int i){
  MessagesTable message=messages.get(i);
  myViewHolder.username.setText(message.getDisplayName());
  String timestamp=message.getTimestamp();
  Log.e("String_Node_Str","String_Node_Str" + message.getText());
  if (!timestamp.equals("String_Node_Str")) {
    timestamp=timestamp.substring(0,10) + "String_Node_Str" + timestamp.substring(11,16);
  }
  Linkify.addLinks(myViewHolder.message,Linkify.WEB_URLS);
  Picasso.get().load(message.getUserAvater()).into(myViewHolder.userImage);
  myViewHolder.time.setText(timestamp);
  myViewHolder.message.setText(message.getText());
}

Fixed version (ground truth):
@Override public void onBindViewHolder(final MessagesAdapter.MyViewHolder myViewHolder,int i){
  MessagesTable message=messages.get(i);
  myViewHolder.username.setText(message.getDisplayName());
  String timestamp=message.getTimestamp();
  if (!timestamp.equals("String_Node_Str")) {
    try {
      DateFormat dateFormat=new SimpleDateFormat("String_Node_Str");
      Date date=dateFormat.parse("String_Node_Str");
      DateFormat formatter=new SimpleDateFormat("String_Node_Str");
      String dateStr=formatter.format(date);
      myViewHolder.time.setText(dateStr);
    }
 catch (    ParseException e) {
      e.printStackTrace();
    }
  }
  Linkify.addLinks(myViewHolder.message,Linkify.WEB_URLS);
  Picasso.get().load(message.getUserAvater()).into(myViewHolder.userImage);
  myViewHolder.message.setText(message.getText());
}
Program: 175788
Project: 175788
Buggy source:
@SuppressLint("String_Node_Str") public void displayRooms(List<RoomsTable> rooms,final String filter){
  if (rooms.size() == 0) {
    getRooms(1);
  }
  new AsyncTask<Void,Void,List<RoomsTable>>(){
    @Override protected List<RoomsTable> doInBackground(    Void... voids){
      Log.i(TAG,"String_Node_Str" + filter);
switch (filter) {
case "String_Node_Str":
        return dao.getAllRooms();
case "String_Node_Str":
      return dao.getPeopleRooms();
default :
    return dao.getAllRooms();
}
}
@Override protected void onPostExecute(List<RoomsTable> notes){
Log.i(TAG,"String_Node_Str" + notes.get(0).getRoomName());
mRooms.clear();
mRooms.addAll(notes);
}
}
.execute();
adapter=new RoomsAdapter(rooms,getContext());
recyclerView.setAdapter(adapter);
getRooms(0);
}

Fixed version (ground truth):
@SuppressLint("String_Node_Str") public void displayRooms(List<RoomsTable> rooms,final String filter){
  if (rooms.size() == 0) {
    getRooms(1);
  }
  new AsyncTask<Void,Void,List<RoomsTable>>(){
    @Override protected List<RoomsTable> doInBackground(    Void... voids){
      Log.i(TAG,"String_Node_Str" + filter);
switch (filter) {
case "String_Node_Str":
        return dao.getAllRooms();
case "String_Node_Str":
      return dao.getPeopleRooms();
default :
    return dao.getAllRooms();
}
}
@Override protected void onPostExecute(List<RoomsTable> notes){
mRooms.clear();
mRooms.addAll(notes);
}
}
.execute();
adapter=new RoomsAdapter(rooms,getContext());
recyclerView.setAdapter(adapter);
getRooms(0);
}
Program: 175789
Project: 175789
Buggy source:
@Override public boolean onClose(){
  displayRooms(mRooms);
  return false;
}

Fixed version (ground truth):
@Override public boolean onClose(){
  displayRooms(mRooms,filter);
  return false;
}
Program: 175790
Project: 175790
Buggy source:
@SuppressLint("String_Node_Str") public void displayRooms(List<RoomsTable> rooms,final String filter){
  if (rooms.size() == 0) {
    getRooms(1);
  }
  new AsyncTask<Void,Void,List<RoomsTable>>(){
    @Override protected List<RoomsTable> doInBackground(    Void... voids){
      Log.i(TAG,"String_Node_Str" + filter);
switch (filter) {
case "String_Node_Str":
        return dao.getAllRooms();
case "String_Node_Str":
      return dao.getPeopleRooms();
default :
    return dao.getAllRooms();
}
}
@Override protected void onPostExecute(List<RoomsTable> notes){
Log.i(TAG,"String_Node_Str" + notes.get(0).getRoomName());
mRooms.clear();
mRooms.addAll(notes);
}
}
.execute();
adapter=new RoomsAdapter(rooms,getContext());
recyclerView.setAdapter(adapter);
getRooms(0);
}

Fixed version (ground truth):
@SuppressLint("String_Node_Str") public void displayRooms(List<RoomsTable> rooms,final String filter){
  if (rooms.size() == 0) {
    getRooms(1);
  }
  new AsyncTask<Void,Void,List<RoomsTable>>(){
    @Override protected List<RoomsTable> doInBackground(    Void... voids){
      Log.i(TAG,"String_Node_Str" + filter);
switch (filter) {
case "String_Node_Str":
        return dao.getAllRooms();
case "String_Node_Str":
      return dao.getPeopleRooms();
default :
    return dao.getAllRooms();
}
}
@Override protected void onPostExecute(List<RoomsTable> notes){
mRooms.clear();
mRooms.addAll(notes);
}
}
.execute();
adapter=new RoomsAdapter(rooms,getContext());
recyclerView.setAdapter(adapter);
getRooms(0);
}
Program: 175791
Project: 175791
Buggy source:
@Override public void onCreateOptionsMenu(Menu menu,MenuInflater inflater){
  inflater.inflate(R.menu.my_options_menu,menu);
  MenuItem item=menu.findItem(R.id.search);
  SearchView searchView=(SearchView)item.getActionView();
  searchView.setOnCloseListener(new SearchView.OnCloseListener(){
    @Override public boolean onClose(){
      displayRooms(mRooms);
      return false;
    }
  }
);
  searchView.setOnQueryTextListener(new SearchView.OnQueryTextListener(){
    @Override public boolean onQueryTextSubmit(    String query){
      return false;
    }
    @Override public boolean onQueryTextChange(    String newText){
      mRooms.clear();
      adapter.notifyDataSetChanged();
      searchRooms(newText);
      return true;
    }
  }
);
  super.onCreateOptionsMenu(menu,inflater);
}

Fixed version (ground truth):
@Override public void onCreateOptionsMenu(Menu menu,MenuInflater inflater){
  inflater.inflate(R.menu.my_options_menu,menu);
  MenuItem item=menu.findItem(R.id.search);
  SearchView searchView=(SearchView)item.getActionView();
  searchView.setOnCloseListener(new SearchView.OnCloseListener(){
    @Override public boolean onClose(){
      displayRooms(mRooms,filter);
      return false;
    }
  }
);
  searchView.setOnQueryTextListener(new SearchView.OnQueryTextListener(){
    @Override public boolean onQueryTextSubmit(    String query){
      return false;
    }
    @Override public boolean onQueryTextChange(    String newText){
      mRooms.clear();
      adapter.notifyDataSetChanged();
      searchRooms(newText);
      return true;
    }
  }
);
  super.onCreateOptionsMenu(menu,inflater);
}
Program: 175792
Project: 175792
Buggy source:
@Override public boolean onOptionsItemSelected(MenuItem item){
switch (item.getItemId()) {
case R.id.action_search:
    openSearchFragment();
  break;
case R.id.action_scan_book:
ShowUtils.showToast("String_Node_Str");
break;
case R.id.action_theme:
ColorPickerDialog colorPickerDialog=new ColorPickerDialog(this);
colorPickerDialog.setOnColorSelectedListener(themeColor -> {
Colorful.config(this).primaryColor(themeColor).accentColor(themeColor).translucent(false).dark(ThemeUtils.isDarkMode()).apply();
changeTheme();
}
);
colorPickerDialog.show();
break;
case R.id.action_dark_theme:
boolean darkMode;
if (Constant.LIGHT_THEME.equals(item.getTitle())) {
AppCompatDelegate.setDefaultNightMode(AppCompatDelegate.MODE_NIGHT_NO);
darkMode=false;
}
 else {
AppCompatDelegate.setDefaultNightMode(AppCompatDelegate.MODE_NIGHT_YES);
darkMode=true;
}
Colorful.config(this).dark(darkMode).apply();
changeTheme();
break;
}
return super.onOptionsItemSelected(item);
}

Fixed version (ground truth):
@Override public boolean onOptionsItemSelected(MenuItem item){
switch (item.getItemId()) {
case R.id.action_search:
    openSearchFragment();
  break;
case R.id.action_scan_book:
ShowUtils.showToast("String_Node_Str");
break;
case R.id.action_theme:
ColorPickerDialog colorPickerDialog=new ColorPickerDialog(this);
colorPickerDialog.setOnColorSelectedListener(themeColor -> {
Colorful.config(this).primaryColor(themeColor).accentColor(themeColor).translucent(false).dark(ThemeUtils.isDarkMode()).apply();
changeTheme();
}
);
colorPickerDialog.show();
break;
case R.id.action_dark_theme:
boolean darkMode;
if (Constant.LIGHT_THEME.equals(item.getTitle())) {
darkMode=false;
}
 else {
darkMode=true;
}
Colorful.config(this).dark(darkMode).apply();
changeTheme();
break;
}
return super.onOptionsItemSelected(item);
}
Program: 175793
Project: 175793
Buggy source:
@Override public boolean onCabItemClicked(MenuItem item){
switch (item.getItemId()) {
case R.id.action_select_all:
    if (UIUtils.getString(R.string.select_all).equals(item.getTitle())) {
      item.setTitle(UIUtils.getString(R.string.un_select_all));
      mRecommendAdapter.selectAll();
      mSelectedBooks.clear();
      mSelectedBooks.addAll(mRecommendAdapter.getDataList());
      setMaterialCabTitle();
    }
 else {
      item.setTitle(UIUtils.getString(R.string.select_all));
      mRecommendAdapter.clearSelected();
      mCab.setTitle(UIUtils.getString(R.string.book_manage));
      mSelectedBooks.clear();
    }
  mCab.getMenu().findItem(R.id.action_delete).setEnabled(!mSelectedBooks.isEmpty());
mRecommendAdapter.notifyDataSetChanged();
break;
case R.id.action_delete:
final boolean[] selected={true};
new AlertDialog.Builder(mActivity).setTitle(UIUtils.getString(R.string.remove_selected_book)).setMultiChoiceItems(new String[]{UIUtils.getString(R.string.delete_local_cache)},selected,(dialogInterface,which,isChecked) -> selected[0]=isChecked).setPositiveButton("String_Node_Str",(dialogInterface,which) -> new BatchManageTask().execute(mSelectedBooks,selected[0])).setNegativeButton("String_Node_Str",null).create().show();
break;
}
return true;
}

Fixed version (ground truth):
@Override public boolean onCabItemClicked(MenuItem item){
switch (item.getItemId()) {
case R.id.action_select_all:
    if (UIUtils.getString(R.string.select_all).equals(item.getTitle())) {
      item.setTitle(UIUtils.getString(R.string.un_select_all));
      mRecommendAdapter.selectAll();
      mSelectedBooks.clear();
      mSelectedBooks.addAll(mRecommendAdapter.getDataList());
      setMaterialCabTitle();
    }
 else {
      item.setTitle(UIUtils.getString(R.string.select_all));
      mRecommendAdapter.clearSelected();
      mCab.setTitle(UIUtils.getString(R.string.book_manage));
      mSelectedBooks.clear();
    }
  mCab.getMenu().findItem(R.id.action_delete).setEnabled(!mSelectedBooks.isEmpty());
mRecommendAdapter.notifyDataSetChanged();
break;
case R.id.action_delete:
batchManage(mSelectedBooks);
break;
}
return true;
}
Program: 175796
Project: 175796
Buggy source:
public Function<ContainerRequest,T> getValueProvider(final Parameter parameter){
  return (request) -> {
    if (parameter.isAnnotationPresent(FernetSecret.class)) {
      final Collection<? extends Key> keys=getKeySupplier().get();
      final Token xAuthorizationToken=getHeaderUtility().getXAuthorizationToken(request);
      if (xAuthorizationToken != null) {
        return getValidator().validateAndDecrypt(keys,xAuthorizationToken);
      }
      final Token authorizationToken=getHeaderUtility().getAuthorizationToken(request);
      if (authorizationToken != null) {
        return getValidator().validateAndDecrypt(keys,authorizationToken);
      }
      throw new WebApplicationException(status(UNAUTHORIZED).entity("String_Node_Str").build());
    }
    throw new IllegalStateException("String_Node_Str");
  }
;
}

Fixed version (ground truth):
public Function<ContainerRequest,T> getValueProvider(final Parameter parameter){
  return request -> {
    if (parameter.isAnnotationPresent(FernetSecret.class)) {
      final Collection<? extends Key> keys=getKeySupplier().get();
      final Token xAuthorizationToken=getHeaderUtility().getXAuthorizationToken(request);
      if (xAuthorizationToken != null) {
        return getValidator().validateAndDecrypt(keys,xAuthorizationToken);
      }
      final Token authorizationToken=getHeaderUtility().getAuthorizationToken(request);
      if (authorizationToken != null) {
        return getValidator().validateAndDecrypt(keys,authorizationToken);
      }
      throw new WebApplicationException(status(UNAUTHORIZED).entity("String_Node_Str").build());
    }
    throw new IllegalStateException("String_Node_Str");
  }
;
}
Program: 175797
Project: 175797
Buggy source:
public Function<ContainerRequest,Token> getValueProvider(final Parameter parameter){
  return (request) -> {
    if (parameter.getRawType().equals(Token.class) && parameter.isAnnotationPresent(FernetToken.class)) {
      final Token xAuthorizationToken=getTokenHeaderUtility().getXAuthorizationToken(request);
      if (xAuthorizationToken != null) {
        return xAuthorizationToken;
      }
      final Token authorizationToken=getTokenHeaderUtility().getAuthorizationToken(request);
      if (authorizationToken != null) {
        return authorizationToken;
      }
      throw new WebApplicationException(status(UNAUTHORIZED).entity("String_Node_Str").build());
    }
    throw new IllegalStateException("String_Node_Str");
  }
;
}

Fixed version (ground truth):
public Function<ContainerRequest,Token> getValueProvider(final Parameter parameter){
  return request -> {
    if (parameter.getRawType().equals(Token.class) && parameter.isAnnotationPresent(FernetToken.class)) {
      final Token xAuthorizationToken=getTokenHeaderUtility().getXAuthorizationToken(request);
      if (xAuthorizationToken != null) {
        return xAuthorizationToken;
      }
      final Token authorizationToken=getTokenHeaderUtility().getAuthorizationToken(request);
      if (authorizationToken != null) {
        return authorizationToken;
      }
      throw new WebApplicationException(status(UNAUTHORIZED).entity("String_Node_Str").build());
    }
    throw new IllegalStateException("String_Node_Str");
  }
;
}
Program: 175798
Project: 175798
Buggy source:
/** 
 * This demonstrates a client who provides the correct credentials, a valid token, but does not pass the business rules required to access the protected resource.
 */
@Test public final void verifyFailedBusinessRuleCheck(){
  final LoginRequest login=new LoginRequest("String_Node_Str","String_Node_Str");
  final Entity<LoginRequest> entity=Entity.json(login);
  final String tokenString=target("String_Node_Str").request().accept(MediaType.TEXT_PLAIN_TYPE).post(entity,String.class);
  thrown.expect(NotAuthorizedException.class);
  target("String_Node_Str").request().header("String_Node_Str",tokenString).get(String.class);
}

Fixed version (ground truth):
/** 
 * This demonstrates a client who provides the correct credentials, a valid token, but does not pass the business rules required to access the protected resource.
 */
@Test public final void verifyFailedBusinessRuleCheck(){
  final LoginRequest login=new LoginRequest("String_Node_Str","String_Node_Str");
  final Entity<LoginRequest> entity=Entity.json(login);
  final String tokenString=target("String_Node_Str").request().accept(MediaType.TEXT_PLAIN_TYPE).post(entity,String.class);
  thrown.expect(NotAuthorizedException.class);
  target("String_Node_Str").request().header("String_Node_Str","String_Node_Str" + tokenString).get(String.class);
}
Program: 175799
Project: 175799
Buggy source:
/** 
 * This demonstrates a client who provides the correct credentials, a valid token, and passes all of the business rules to access the protected resource.
 */
@Test public final void verifySuccessfulBusinessRuleCheck(){
  final LoginRequest login=new LoginRequest("String_Node_Str","String_Node_Str");
  final Entity<LoginRequest> entity=Entity.json(login);
  final String tokenString=target("String_Node_Str").request().accept(MediaType.TEXT_PLAIN_TYPE).post(entity,String.class);
  final String result=target("String_Node_Str").request().header("String_Node_Str",tokenString).get(String.class);
  assertEquals("String_Node_Str",result);
}

Fixed version (ground truth):
/** 
 * This demonstrates a client who provides the correct credentials, a valid token, and passes all of the business rules to access the protected resource.
 */
@Test public final void verifySuccessfulBusinessRuleCheck(){
  final LoginRequest login=new LoginRequest("String_Node_Str","String_Node_Str");
  final Entity<LoginRequest> entity=Entity.json(login);
  final String tokenString=target("String_Node_Str").request().accept(MediaType.TEXT_PLAIN_TYPE).post(entity,String.class);
  final String result=target("String_Node_Str").request().header("String_Node_Str","String_Node_Str" + tokenString).get(String.class);
  assertEquals("String_Node_Str",result);
}
Program: 175800
Project: 175800
Buggy source:
/** 
 * This demonstrates a client who attempts to forge a Fernet token but cannot do so without knowing the secret key.
 */
@Test public final void verifyFailedForgery(){
  final Random random=new SecureRandom();
  final Key invalidKey=Key.generateKey(random);
  final Token forgedToken=Token.generate(random,invalidKey,"String_Node_Str");
  final String tokenString=forgedToken.serialise();
  thrown.expect(NotAuthorizedException.class);
  target("String_Node_Str").request().header("String_Node_Str",tokenString).get(String.class);
}

Fixed version (ground truth):
/** 
 * This demonstrates a client who attempts to forge a Fernet token but cannot do so without knowing the secret key.
 */
@Test public final void verifyFailedForgery(){
  final Random random=new SecureRandom();
  final Key invalidKey=Key.generateKey(random);
  final Token forgedToken=Token.generate(random,invalidKey,"String_Node_Str");
  final String tokenString=forgedToken.serialise();
  thrown.expect(NotAuthorizedException.class);
  target("String_Node_Str").request().header("String_Node_Str","String_Node_Str" + tokenString).get(String.class);
}
Program: 175802
Project: 175802
Buggy source:
@Override public void completed(final ClientConnection connection){
  final ServerConnection serverConnection=exchange.getConnection();
  serverConnection.putAttachment(clientAttachmentKey,connection);
  serverConnection.addCloseListener(serverConnection1 -> IoUtils.safeClose(connection));
  connection.getCloseSetter().set((ChannelListener<Channel>)channel -> serverConnection.removeAttachment(clientAttachmentKey));
  exchange.setRelativePath("String_Node_Str");
  Realm realm=realmCache.matches(exchange.getRequestPath());
  Application application=realmCache.getApplication(realm);
  String path=exchange.getRequestPath();
  if (path.startsWith(application.getVirtualPath())) {
    String passTo=calculatePathTo(path,application);
    exchange.setRequestPath(passTo);
    exchange.setRequestURI(passTo);
  }
  callback.completed(exchange,new ProxyConnection(connection,"String_Node_Str"));
}

Fixed version (ground truth):
@Override public void completed(final ClientConnection connection){
  final ServerConnection serverConnection=exchange.getConnection();
  serverConnection.putAttachment(clientAttachmentKey,connection);
  serverConnection.addCloseListener(serverConnection1 -> IoUtils.safeClose(connection));
  connection.getCloseSetter().set((ChannelListener<Channel>)channel -> serverConnection.removeAttachment(clientAttachmentKey));
  exchange.setRelativePath("String_Node_Str");
  Realm realm=realmCache.matches(exchange.getRequestPath());
  Application application=realmCache.getApplication(realm);
  String path=exchange.getRequestURI();
  if (path.startsWith(application.getVirtualPath())) {
    String passTo=calculatePathTo(path,application);
    exchange.setRequestPath(passTo);
    exchange.setRequestURI(passTo);
  }
  callback.completed(exchange,new ProxyConnection(connection,"String_Node_Str"));
}
Program: 175806
Project: 175806
Buggy source:
public static Color mean(BufferedImage rgb,List<? extends DRectangle> frects){
  int count=0;
  long[] values=new long[3];
  for (  DRectangle f : frects)   for (int x=(int)f.x; x < f.x + f.width; x++)   for (int y=rgb.getHeight() - (int)(f.y + f.height); y < rgb.getHeight() - (f.y); y++) {
    if (x < 0 || x >= rgb.getWidth() || y < 0 || y >= rgb.getHeight())     continue;
    int val=rgb.getRGB(x,y);
    values[0]+=(val & 0xff0000) >> 16;
    values[1]+=(val & 0x00ff00) >> 8;
    values[2]+=(val & 0x0000ff) >> 0;
    count++;
  }
  if (count > 0) {
    values[0]/=count;
    values[1]/=count;
    values[2]/=count;
  }
  return new Color((int)((values[0] << 16) + (values[1] << 8) + values[2]));
}

Fixed version (ground truth):
public static Color mean(BufferedImage rgb,List<? extends DRectangle> frects){
  int count=0;
  long[] values=new long[3];
  for (  DRectangle f : frects)   for (int x=(int)f.x; x < f.x + f.width; x++)   for (int y=rgb.getHeight() - (int)(f.y + f.height); y < rgb.getHeight() - (f.y); y++) {
    if (x < 0 || x >= rgb.getWidth() || y < 0 || y >= rgb.getHeight())     continue;
    int val=rgb.getRGB(x,y);
    values[0]+=(val & 0xff0000) >> 16;
    values[1]+=(val & 0x00ff00) >> 8;
    values[2]+=(val & 0x0000ff) >> 0;
    count++;
  }
  if (count > 0) {
    values[0]/=count;
    values[1]/=count;
    values[2]/=count;
  }
 else   return Color.lightGray;
  return new Color((int)((values[0] << 16) + (values[1] << 8) + values[2]));
}
Program: 175807
Project: 175807
Buggy source:
@Override public void finishedBatches(List<App> all){
  super.finishedBatches(all);
  for (  App a : all) {
    PanesTexApp pta=(PanesTexApp)a;
    PanesLabelApp pla=pta.fr.panesLabelApp;
    if (pla.label == null)     continue;
    pla.fr.mf.facadeTexApp.coarseWithWindows=null;
  }
  super.finishedBatches(all);
}

Fixed version (ground truth):
@Override public void finishedBatches(List<App> all){
  super.finishedBatches(all);
  for (  App a : all) {
    PanesTexApp pta=(PanesTexApp)a;
    PanesLabelApp pla=pta.fr.panesLabelApp;
    if (pla.label == null)     continue;
  }
  super.finishedBatches(all);
}
Program: 175809
Project: 175809
Buggy source:
public SkelGen(HalfMesh2 mesh,Tweed tweed,BlockGen blockGen){
  super("String_Node_Str",tweed);
  setRender(mesh);
  this.blockGen=blockGen;
  ProgressMonitor m=new ProgressMonitor(tweed.frame(),"String_Node_Str","String_Node_Str",0,100);
  m.setProgress(1);
  m.setMillisToPopup(0);
}

Fixed version (ground truth):
public SkelGen(HalfMesh2 mesh,Tweed tweed,BlockGen blockGen){
  super("String_Node_Str",tweed);
  setRender(mesh);
  this.blockGen=blockGen;
}
Program: 175811
Project: 175811
Buggy source:
@Override public void actionPerformed(ActionEvent e){
  new SimpleFileChooser(tweed.frame.frame,true,"String_Node_Str",null,"String_Node_Str"){
    @Override public void heresTheFile(    File f) throws Throwable {
      Map<HalfFace,PlanSkeleton> store=new HashMap<>();
      for (      HalfFace f2 : SkelGen.this.block)       store.put(f2,((SuperFace)f2).skel);
      for (      HalfFace f2 : SkelGen.this.block) {
        SuperFace sf=(SuperFace)f2;
        sf.heights=null;
        sf.maxProfHeights=null;
        sf.colors=new ArrayList<>();
        for (        Bar b : sf.skel.plan.points.eIterator()) {
          SETag set=(SETag)GreebleHelper.getTag(b.tags,SETag.class);
          if (set != null)           set.se.prof=toProf(sf.skel.plan.profiles.get(b));
        }
        sf.skel=null;
        for (        HalfEdge e : f2) {
          SuperEdge se=(SuperEdge)e;
          if (se.profLine != null)           se.profLine.mega=null;
          if (e.over != null && ((SuperEdge)e.over).profLine != null)           ((SuperEdge)e.over).profLine.mega=null;
        }
      }
      blockGen=null;
      new XStream().toXML(SkelGen.this,new FileOutputStream(f));
      for (      HalfFace f2 : SkelGen.this.block)       ((SuperFace)f2).skel=store.get(f2);
    }
  }
;
}

Fixed version (ground truth):
@Override public void actionPerformed(ActionEvent e){
  new SimpleFileChooser(tweed.frame.frame,true,"String_Node_Str",null,"String_Node_Str"){
    @Override public void heresTheFile(    File f) throws Throwable {
      HalfMesh2 nBlock=new HalfMesh2();
      for (      HalfFace f2 : SkelGen.this.block) {
        SuperFace sf=(SuperFace)f2;
        List<Bar> bars=new ArrayList();
        for (        Bar b : sf.skel.plan.points.eIterator())         bars.add(b);
        Collections.reverse(bars);
        HalfMesh2.Builder builder=new HalfMesh2.Builder(SuperEdge.class,SuperFace.class);
        builder.mesh=nBlock;
        for (        Bar b : bars)         builder.newPoint(b.start);
        SuperFace sf3=(SuperFace)builder.newFace();
        sf3.height=sf.height;
        sf3.maxProfHeights=new ArrayList<>(sf.maxProfHeights);
        HalfEdge h3=sf3.e;
        for (        Bar b : bars) {
          SuperEdge s3=(SuperEdge)h3;
          s3.prof=toProf(sf.skel.plan.profiles.get(b));
          h3=h3.next;
        }
      }
      new XStream().toXML(new SkelGen(nBlock,null,null),new FileOutputStream(f));
    }
  }
;
}
Program: 175813
Project: 175813
Buggy source:
@Override public void heresTheFile(File f) throws Throwable {
  Map<HalfFace,PlanSkeleton> store=new HashMap<>();
  for (  HalfFace f2 : SkelGen.this.block)   store.put(f2,((SuperFace)f2).skel);
  for (  HalfFace f2 : SkelGen.this.block) {
    SuperFace sf=(SuperFace)f2;
    sf.heights=null;
    sf.maxProfHeights=null;
    sf.colors=new ArrayList<>();
    for (    Bar b : sf.skel.plan.points.eIterator()) {
      SETag set=(SETag)GreebleHelper.getTag(b.tags,SETag.class);
      if (set != null)       set.se.prof=toProf(sf.skel.plan.profiles.get(b));
    }
    sf.skel=null;
    for (    HalfEdge e : f2) {
      SuperEdge se=(SuperEdge)e;
      if (se.profLine != null)       se.profLine.mega=null;
      if (e.over != null && ((SuperEdge)e.over).profLine != null)       ((SuperEdge)e.over).profLine.mega=null;
    }
  }
  blockGen=null;
  new XStream().toXML(SkelGen.this,new FileOutputStream(f));
  for (  HalfFace f2 : SkelGen.this.block)   ((SuperFace)f2).skel=store.get(f2);
}

Fixed version (ground truth):
@Override public void heresTheFile(File f) throws Throwable {
  HalfMesh2 nBlock=new HalfMesh2();
  for (  HalfFace f2 : SkelGen.this.block) {
    SuperFace sf=(SuperFace)f2;
    List<Bar> bars=new ArrayList();
    for (    Bar b : sf.skel.plan.points.eIterator())     bars.add(b);
    Collections.reverse(bars);
    HalfMesh2.Builder builder=new HalfMesh2.Builder(SuperEdge.class,SuperFace.class);
    builder.mesh=nBlock;
    for (    Bar b : bars)     builder.newPoint(b.start);
    SuperFace sf3=(SuperFace)builder.newFace();
    sf3.height=sf.height;
    sf3.maxProfHeights=new ArrayList<>(sf.maxProfHeights);
    HalfEdge h3=sf3.e;
    for (    Bar b : bars) {
      SuperEdge s3=(SuperEdge)h3;
      s3.prof=toProf(sf.skel.plan.profiles.get(b));
      h3=h3.next;
    }
  }
  new XStream().toXML(new SkelGen(nBlock,null,null),new FileOutputStream(f));
}
Program: 175814
Project: 175814
Buggy source:
public App(){
  NetInfo ni=getNetInfo();
  this.name=ni.name;
  this.styleZ=new double[ni.sizeZ];
  this.styleSource=new GaussStyle(NetInfo.get(this));
}

Fixed version (ground truth):
public App(){
  NetInfo ni=getNetInfo();
  this.name=ni.name;
  this.styleZ=new double[ni.sizeZ];
  this.styleSource=new GaussStyle(this.getClass());
}
Program: 175815
Project: 175815
Buggy source:
public void finishedBatches(List<App> all,AppStore ass){
  for (  App a : all)   a.markDirty(ass);
}

Fixed version (ground truth):
public void finishedBatches(List<App> all,AppStore ass){
  for (  App a : all)   a.markGeometryDirty(ass);
}
Program: 175816
Project: 175816
Buggy source:
@Override public JComponent createUI(Runnable globalUpdate,SelectedApps sa){
  JPanel out=new JPanel(new ListDownLayout());
  if (styleSource instanceof JointStyle) {
    JButton g=new JButton("String_Node_Str");
    g.addActionListener(new ActionListener(){
      @Override public void actionPerformed(      ActionEvent e){
        setGauss(Collections.singletonList(BlockApp.this));
        sa.showUI();
      }
      private void setGauss(      List<App> hashSet){
        for (        App a : hashSet) {
          a.styleSource=new GaussStyle(a.getNetInfo());
          a.appMode=AppMode.Net;
          setGauss(a.getDown(sa.ass).valueList());
        }
      }
    }
);
    out.add(g);
    out.add(new AutoCheckbox(this,"String_Node_Str","String_Node_Str"){
      public void updated(      boolean selected){
        for (        App a : sa)         ((BlockApp)a).doSkirt=selected;
        globalUpdate.run();
      }
    }
);
  }
 else {
    JButton j=new JButton("String_Node_Str");
    j.addActionListener(new ActionListener(){
      @Override public void actionPerformed(      ActionEvent e){
        styleSource=new JointStyle(null);
        appMode=AppMode.Net;
        styleSource.install(new SelectedApps((App)BlockApp.this,sa.ass,sa.geometryUpdate));
        sa.showUI();
      }
    }
);
    out.add(j);
  }
  return out;
}

Fixed version (ground truth):
@Override public JComponent createUI(Runnable globalUpdate,SelectedApps sa){
  JPanel out=new JPanel(new ListDownLayout());
  if (styleSource instanceof JointStyle) {
    JButton g=new JButton("String_Node_Str");
    g.addActionListener(new ActionListener(){
      @Override public void actionPerformed(      ActionEvent e){
        setGauss(Collections.singletonList(BlockApp.this));
        sa.showUI();
      }
      private void setGauss(      List<App> hashSet){
        for (        App a : hashSet) {
          a.styleSource=new GaussStyle(BlockApp.this.getClass());
          a.appMode=AppMode.Net;
          setGauss(a.getDown(sa.ass).valueList());
        }
      }
    }
);
    out.add(g);
    out.add(new AutoCheckbox(this,"String_Node_Str","String_Node_Str"){
      public void updated(      boolean selected){
        for (        App a : sa)         ((BlockApp)a).doSkirt=selected;
        globalUpdate.run();
      }
    }
);
  }
 else {
    JButton j=new JButton("String_Node_Str");
    j.addActionListener(new ActionListener(){
      @Override public void actionPerformed(      ActionEvent e){
        styleSource=new JointStyle(null);
        appMode=AppMode.Net;
        styleSource.install(new SelectedApps((App)BlockApp.this,sa.ass,sa.geometryUpdate));
        sa.showUI();
      }
    }
);
    out.add(j);
  }
  return out;
}
Program: 175817
Project: 175817
Buggy source:
private void setGauss(List<App> hashSet){
  for (  App a : hashSet) {
    a.styleSource=new GaussStyle(a.getNetInfo());
    a.appMode=AppMode.Net;
    setGauss(a.getDown(sa.ass).valueList());
  }
}

Fixed version (ground truth):
private void setGauss(List<App> hashSet){
  for (  App a : hashSet) {
    a.styleSource=new GaussStyle(BlockApp.this.getClass());
    a.appMode=AppMode.Net;
    setGauss(a.getDown(sa.ass).valueList());
  }
}
Program: 175818
Project: 175818
Buggy source:
@Override public JComponent createUI(Runnable globalUpdate,SelectedApps apps){
  JPanel out=new JPanel(new ListDownLayout());
  addRemoveButton(globalUpdate,out);
  out.add(new AutoCheckbox(this,"String_Node_Str","String_Node_Str"){
    @Override public void updated(    boolean selected){
      updateDormers(selected,apps.ass);
      globalUpdate.run();
    }
  }
);
  JButton siteplan=new JButton("String_Node_Str");
  siteplan.addActionListener(e -> new SiteplanDesigner(superFace,parent));
  out.add(siteplan);
  return out;
}

Fixed version (ground truth):
@Override public JComponent createUI(Runnable globalUpdate,SelectedApps apps){
  JPanel out=new JPanel(new ListDownLayout());
  addRemoveButton(globalUpdate,out);
  out.add(new AutoDoubleSlider(this,"String_Node_Str","String_Node_Str",0,1){
    public void updated(    double value){
      updateDormers(new Random());
      globalUpdate.run();
    }
  }
);
  JButton siteplan=new JButton("String_Node_Str");
  siteplan.addActionListener(e -> new SiteplanDesigner(superFace,parent));
  out.add(siteplan);
  return out;
}
Program: 175819
Project: 175819
Buggy source:
@Override public void updated(boolean selected){
  updateDormers(selected,apps.ass);
  globalUpdate.run();
}

Fixed version (ground truth):
public void updated(double value){
  updateDormers(new Random());
  globalUpdate.run();
}
Program: 175820
Project: 175820
Buggy source:
public void updateDormers(boolean dormers,AppStore ac){
  createDormers=dormers;
}

Fixed version (ground truth):
public void updateDormers(Random randy){
  createDormers=randy.nextDouble() < probDormer;
}
Program: 175821
Project: 175821
Buggy source:
public void markDirty(){
  if (exemplar instanceof BlockApp)   for (  App building : exemplar.getDown(ass).valueList())   ((BuildingApp)building).isDirty=true;
 else   for (  App a : SelectedApps.this)   a.markDirty(ass);
}

Fixed version (ground truth):
public void markDirty(){
  if (exemplar instanceof BlockApp)   for (  App building : exemplar.getDown(ass).valueList())   ((BuildingApp)building).isGeometryDirty=true;
 else   for (  App a : SelectedApps.this)   a.markGeometryDirty(ass);
}
Program: 175822
Project: 175822
Buggy source:
public SETag(SuperEdge se){
  this.se=se;
}

Fixed version (ground truth):
public SETag(SuperEdge se,SuperFace sf){
  this.se=se;
  this.sf=sf;
}
Program: 175823
Project: 175823
Buggy source:
public void show(Output output,Skeleton threadKey){
  super.show(output,threadKey);
  tweed.enqueue(new Runnable(){
    @Override public void run(){
      removeGeometryFor(sf);
      tweed.frame.setGenUI(null);
      sf.skel=(PlanSkeleton)threadKey;
      sf.skel.output.addNonSkeletonSharedEdges(new RoofTag(Colourz.toF4(sf.mr.app.color)));
      sf.mr.setOutline(sf.skel.output);
      setSkel((PlanSkeleton)threadKey,sf);
    }
  }
);
}

Fixed version (ground truth):
public void show(Output output,Skeleton threadKey){
  super.show(output,threadKey);
  tweed.enqueue(new Runnable(){
    @Override public void run(){
      removeGeometryFor(sf);
      tweed.frame.setGenUI(null);
      sf.skel=(PlanSkeleton)threadKey;
      for (      Face f : sf.skel.output.faces.values()) {
        WallTag wt=((WallTag)GreebleHelper.getTag(f.profile,WallTag.class));
        if (wt != null && wt.miniFacade == null) {
          wt.miniFacade=new MiniFacade();
          SETag set=(SETag)GreebleHelper.getTag(f.plan,SETag.class);
          if (set != null)           wt.miniFacade.app.parent=(SuperFace)set.se.face;
        }
      }
      sf.skel.output.addNonSkeletonSharedEdges(new RoofTag(Colourz.toF4(sf.mr.app.color)));
      sf.mr.setOutline(sf.skel.output);
      setSkel((PlanSkeleton)threadKey,sf);
    }
  }
);
}
Program: 175824
Project: 175824
Buggy source:
public void addedBar(Bar bar){
  SETag oldTag=(SETag)bar.tags.iterator().next();
  bar.tags.clear();
  SuperEdge se=new SuperEdge(bar.start,bar.end,null);
  SETag tag=new SETag(se);
  tag.color=Rainbow.random();
  tag.name=Math.random() + "String_Node_Str";
  bar.tags.add(tag);
  List<Point2d> defpts=new ArrayList<>();
  defpts.add(new Point2d(0,0));
  defpts.add(new Point2d(0,-10));
  defpts.add(new Point2d(5,-15));
  Profile profile=new Profile(defpts);
  tagWalls(sf,profile,se,bar.start,bar.end);
  plan.addLoop(profile.points.get(0),plan.root,profile);
  plan.profiles.put(bar,profile);
}

Fixed version (ground truth):
public void addedBar(Bar bar){
  SETag oldTag=(SETag)bar.tags.iterator().next();
  bar.tags.clear();
  SuperEdge se=new SuperEdge(bar.start,bar.end,null);
  SETag tag=new SETag(se,sf);
  tag.color=Rainbow.random();
  tag.name=Math.random() + "String_Node_Str";
  bar.tags.add(tag);
  List<Point2d> defpts=new ArrayList<>();
  defpts.add(new Point2d(0,0));
  defpts.add(new Point2d(0,-10));
  defpts.add(new Point2d(5,-15));
  Profile profile=new Profile(defpts);
  tagWalls(sf,profile,se,bar.start,bar.end);
  plan.addLoop(profile.points.get(0),plan.root,profile);
  plan.profiles.put(bar,profile);
}
Program: 175830
Project: 175830
Buggy source:
public Map<Griddable,DRectangle> findPositions(){
  Map<Griddable,Double[]> rx=findRange(x), ry=findRange(y);
  Map<Griddable,DRectangle> out=new HashMap<>();
  rx.keySet().stream().forEach(g -> out.put(g,new DRectangle(rx.get(g)[0],ry.get(g)[0],rx.get(g)[1] - rx.get(g)[0],ry.get(g)[1] - ry.get(g)[0])));
  return out;
}

Fixed version (ground truth):
public Map<Griddable,DRectangle> findPositions(){
  Map<Griddable,DRectangle> out=new HashMap<>();
  if (x == null || y == null)   return out;
  Map<Griddable,Double[]> rx=findRange(x), ry=findRange(y);
  rx.keySet().stream().forEach(g -> out.put(g,new DRectangle(rx.get(g)[0],ry.get(g)[0],rx.get(g)[1] - rx.get(g)[0],ry.get(g)[1] - ry.get(g)[0])));
  return out;
}
Program: 175831
Project: 175831
Buggy source:
private void constrainMoulding(MiniFacade mf,FRect d,double alpha){
  final double tol=4;
  if (d.x < mf.left + tol)   set(d,Bounds.XMIN,mf.left + 0.1,alpha * 5);
  if (d.x > mf.left + mf.width - tol)   set(d,Bounds.XMAX,mf.left + mf.width - 0.1,alpha * 5);
}

Fixed version (ground truth):
private void constrainMoulding(MiniFacade mf,FRect d,double alpha){
  for (int j=0; j < d.adjacent.length; j++) {
    FRect n=d.adjacent[j];
    if (n == null)     continue;
    DRectangle u=d.union(n), i=d.intersect(n);
    double ia=i == null ? 0 : i.area();
    if ((n.area() + d.area() - ia) / u.area() > 0.7) {
      d.setFrom(u);
      d.adjacent[j]=null;
      mf.featureGen.remove(n.f,n);
    }
  }
  for (  FRect avoid : mf.featureGen.getRects(Feature.WINDOW,Feature.SHOP)) {
    if (d.intersects(avoid)) {
      for (      Bounds[] b : new Bounds[][]{{Bounds.YMIN,Bounds.YMAX},{Bounds.XMIN,Bounds.XMAX}}) {
        Bounds min=b[0], max=b[1];
        if (d.get(max) > avoid.get(min) && d.get(max) < avoid.get(max)) {
          if (d.get(min) < avoid.get(min))           d.set(max,avoid.get(min));
 else {
            mf.featureGen.remove(d.f,d);
            return;
          }
        }
 else         if (d.get(min) > avoid.get(min) && d.get(min) < avoid.get(max)) {
          if (d.get(max) > avoid.get(max)) {
            d.set(min,avoid.get(max));
          }
 else {
            mf.featureGen.remove(d.f,d);
            return;
          }
        }
      }
    }
  }
  final double tol=4;
  if (d.x < mf.left + tol)   set(d,Bounds.XMIN,mf.left + 0.1,alpha * 5);
  if (d.x > mf.left + mf.width - tol)   set(d,Bounds.XMAX,mf.left + mf.width - 0.1,alpha * 5);
}
Program: 175835
Project: 175835
Buggy source:
public static void computeWithChildren(List<App> todo,int first,Runnable globalUpdate){
  if (first >= todo.size()) {
    System.out.println("String_Node_Str" + todo.get(0).getClass().getSimpleName());
    globalUpdate.run();
    MultiMap<String,App> downs=new MultiMap<>();
    for (    App a : todo)     downs.putAll(a.getDown());
    for (    String d : downs.keySet())     new Thread(() -> App.computeWithChildren(downs.get(d),0,globalUpdate)).start();
  }
 else {
    List<App> batch=new ArrayList<>();
    for (int i=first; i < Math.min(todo.size(),first + Batch_Size); i++) {
      App app=todo.get(i);
      if (app.appMode == AppMode.Net) {
        if (app.styleSource != null)         app.styleZ=app.styleSource.draw(randy,app);
        batch.add(todo.get(i));
      }
    }
    if (!batch.isEmpty()) {
      System.out.println("String_Node_Str" + first + "String_Node_Str"+ todo.get(0).getClass().getSimpleName());
      batch.get(0).computeBatch(() -> App.computeWithChildren(todo,first + Batch_Size,globalUpdate),batch);
    }
 else     App.computeWithChildren(todo,first + Batch_Size,globalUpdate);
  }
}

Fixed version (ground truth):
public static void computeWithChildren(int first,int stage,MultiMap<Integer,App> todo,Runnable globalUpdate){
  if (todo.get(stage).isEmpty())   return;
  if (first >= todo.size()) {
    System.out.println("String_Node_Str" + todo.get(0).getClass().getSimpleName());
    globalUpdate.run();
    for (    App a : new ArrayList<>(todo.get(stage)))     todo.put(NetInfo.evaluationOrder.indexOf(a.getClass()),a);
    App.computeWithChildren(0,stage + 1,todo,globalUpdate);
  }
 else {
    List<App> all=todo.get(stage);
    List<App> batch=new ArrayList<>();
    for (int i=first; i < Math.min(all.size(),first + Batch_Size); i++) {
      App app=all.get(i);
      if (app.appMode == AppMode.Net) {
        if (app.styleSource != null)         app.styleZ=app.styleSource.draw(randy,app);
        batch.add(app);
      }
    }
    if (!batch.isEmpty()) {
      System.out.println("String_Node_Str" + first + "String_Node_Str"+ all.size()+ "String_Node_Str"+ todo.get(0).getClass().getSimpleName());
      batch.get(0).computeBatch(() -> App.computeWithChildren(first + Batch_Size,stage,todo,globalUpdate),batch);
    }
 else     App.computeWithChildren(0,stage + 1,todo,globalUpdate);
  }
}
Program: 175836
Project: 175836
Buggy source:
public void computeAll(Runnable globaUpdate){
  computeAll_(globaUpdate,0);
}

Fixed version (ground truth):
public void computeAll(Runnable globalUpdate){
  MultiMap<Integer,App> todo=new MultiMap<>();
  int i=NetInfo.evaluationOrder.indexOf(get(0).getClass());
  todo.putAll(i,this);
  App.computeWithChildren(0,i,todo,globalUpdate);
}
Program: 175837
Project: 175837
Buggy source:
public void setUI(JPanel out,boolean byExample,Runnable update){
  out.removeAll();
  if (byExample) {
    ImageFileDrop drop=new ImageFileDrop(imageFile.getMeanImage()){
      public BufferedImage process(      File f){
        imageFile.setMeanImage(f);
        return new Pix2Pix(netInfo).encode(f,vector,update);
      }
      @Override public void rightClick(){
        super.rightClick();
        method.doClick();
      }
    }
;
    out.add(drop);
  }
 else {
    imageFile.setMeanImage(null);
    NSliders sliders=new NSliders(vector,update,new Runnable(){
      @Override public void run(){
        method.doClick();
      }
      @Override public String toString(){
        return "String_Node_Str";
      }
    }
);
    out.add(sliders);
  }
  out.repaint();
  out.revalidate();
}

Fixed version (ground truth):
public void setUI(JPanel out,boolean byExample,Runnable update){
  out.removeAll();
  if (byExample) {
    ImageFileDrop drop=new ImageFileDrop(imageFile.getMeanImage()){
      public BufferedImage process(      File f){
        imageFile.setMeanImage(f);
        return new Pix2Pix(netInfo).encode(f,vector,update);
      }
      @Override public void rightClick(){
        super.rightClick();
        method.doClick();
      }
    }
;
    out.add(drop);
  }
 else {
    NSliders sliders=new NSliders(vector,update,new Runnable(){
      @Override public void run(){
        method.doClick();
      }
      @Override public String toString(){
        return "String_Node_Str";
      }
    }
);
    out.add(sliders);
  }
  out.repaint();
  out.revalidate();
}
Program: 175838
Project: 175838
Buggy source:
public UIVector(double[] vector,MeanImageProvider imageFile,NetInfo netInfo,boolean showManual,Runnable update){
  this.netInfo=netInfo;
  this.vector=vector;
  this.imageFile=imageFile;
  setLayout(new BorderLayout());
  method=new JToggleButton("String_Node_Str");
  JPanel options=new JPanel(new ListDownLayout());
  method.addActionListener(e -> setUI(options,!method.isSelected(),update));
  if (showManual)   add(method,BorderLayout.NORTH);
  add(options,BorderLayout.CENTER);
  setUI(options,!method.isSelected(),update);
}

Fixed version (ground truth):
public UIVector(double[] vector,MeanImageProvider imageFile,NetInfo netInfo,boolean showManual,Runnable update){
  this.netInfo=netInfo;
  this.vector=vector;
  this.imageFile=imageFile;
  setLayout(new BorderLayout());
  method=new JToggleButton("String_Node_Str");
  method.setSelected(imageFile.getMeanImage() == null);
  JPanel options=new JPanel(new ListDownLayout());
  method.addActionListener(e -> setUI(options,!method.isSelected(),update));
  if (showManual)   add(method,BorderLayout.NORTH);
  add(options,BorderLayout.CENTER);
  setUI(options,!method.isSelected(),update);
}
Program: 175842
Project: 175842
Buggy source:
public int tile(String s,File result){
  File out=new File(result,s + "String_Node_Str");
  if (out.exists())   return 1;
  Matcher m=p.matcher(s);
  if (m.matches()) {
    String panoid=m.group(1);
    BufferedImage mosaic=new BufferedImage(26 * 512,13 * 512,BufferedImage.TYPE_3BYTE_BGR);
    Graphics g=mosaic.getGraphics();
    for (int x=0; x <= 25; x++)     for (int y=0; y <= 12; y++) {
      URL url;
      try {
        url=new URL("String_Node_Str" + panoid + "String_Node_Str"+ x+ "String_Node_Str"+ y);
        g.drawImage(ImageIO.read(url),x * 512,y * 512,null);
      }
 catch (      Throwable th) {
        th.printStackTrace();
      }
    }
    g.dispose();
    try {
      ImageWriter writer=ImageIO.getImageWritersByFormatName("String_Node_Str").next();
      ImageWriteParam param=writer.getDefaultWriteParam();
      param.setCompressionMode(ImageWriteParam.MODE_EXPLICIT);
      param.setCompressionQuality(1f);
      ImageOutputStream ios=ImageIO.createImageOutputStream(out);
      writer.setOutput(ios);
      writer.write(mosaic);
    }
 catch (    IOException e) {
      e.printStackTrace();
    }
  }
  return 1;
}

Fixed version (ground truth):
public int tile(String s,File result){
  File out=new File(result,s + "String_Node_Str");
  if (out.exists())   return 1;
  Matcher m=p.matcher(s);
  if (m.matches()) {
    String panoid=m.group(1);
    BufferedImage mosaic=new BufferedImage(26 * 512,13 * 512,BufferedImage.TYPE_3BYTE_BGR);
    Graphics g=mosaic.getGraphics();
    boolean failed=false;
    for (int x=0; x <= 25; x++)     for (int y=0; y <= 12; y++) {
      URL url;
      try {
        url=new URL("String_Node_Str" + panoid + "String_Node_Str"+ x+ "String_Node_Str"+ y);
        g.drawImage(ImageIO.read(url),x * 512,y * 512,null);
      }
 catch (      Throwable th) {
        th.printStackTrace();
        ongoing.abort();
        failed=true;
      }
    }
    g.dispose();
    if (!failed)     try {
      ImageWriter writer=ImageIO.getImageWritersByFormatName("String_Node_Str").next();
      ImageWriteParam param=writer.getDefaultWriteParam();
      param.setCompressionMode(ImageWriteParam.MODE_EXPLICIT);
      param.setCompressionQuality(1f);
      ImageOutputStream ios=ImageIO.createImageOutputStream(out);
      writer.setOutput(ios);
      writer.write(mosaic);
    }
 catch (    IOException e) {
      e.printStackTrace();
    }
  }
  return 1;
}
Program: 175843
Project: 175843
Buggy source:
public void processLines(List<String> lines,File result){
  System.out.println(lines.size() + "String_Node_Str");
  new Parallel<String,Integer>(lines,s -> tile(s,result),s -> System.out.println("String_Node_Str" + s.stream().mapToInt(x -> x).sum()),true);
}

Fixed version (ground truth):
public void processLines(List<String> lines,File result){
  System.out.println(lines.size() + "String_Node_Str");
  ongoing=new Parallel.ListWF<String>(lines);
  new Parallel<String,Integer>(ongoing,s -> tile(s,result),s -> System.out.println("String_Node_Str" + s.stream().mapToInt(x -> x).sum()),true,16);
}