nus-yam/ex-repair huggingface dataset:
Program: 62938
Project: 62938
Buggy source:
@Override public void onInit(GitHubData data){
  if (data instanceof ContributorsData) {
    if (((ContributorsData)data).contributors != null) {
      for (      ContributorsData.ContributorData contributor : ((ContributorsData)data).contributors) {
        if (contributor.login == null)         continue;
        TranslatorInfoData mergeTranslator=new TranslatorInfoData(contributor.login,null,contributor.avatar_url,null,null,null);
        TranslatorInfoData translatorInfo=mergeTranslator;
        if (translators.contains(mergeTranslator)) {
          translatorInfo=translators.get(translators.indexOf(mergeTranslator));
          translatorInfo.merge(mergeTranslator);
        }
 else         translators.add(translatorInfo);
        if (!translatorInfo.hasEverything())         addRequest(new UserData(contributor.login));
      }
    }
  }
 else   if (data instanceof UserData) {
    UserData user=(UserData)data;
    TranslatorInfoData translator=new TranslatorInfoData(user.login,user.name,user.avatar_url,null,user.blog,user.email);
    if (!translators.contains(translator))     translators.add(0,translator);
 else     translators.get(translators.indexOf(translator)).merge(translator);
  }
}

Fixed version (ground truth):
@Override public void onInit(GitHubData data){
  if (data instanceof ContributorsData) {
    if (((ContributorsData)data).contributors != null) {
      for (      ContributorsData.ContributorData contributor : ((ContributorsData)data).contributors) {
        if (contributor.login == null)         continue;
        InfoData child=addChild(new TranslatorInfoData(contributor.login,null,contributor.avatar_url,null,null,null));
        if (child instanceof Mergeable && !((Mergeable)child).hasAll())         addRequest(new UserData(contributor.login));
      }
    }
  }
 else   if (data instanceof UserData) {
    UserData user=(UserData)data;
    addChild(0,new TranslatorInfoData(user.login,user.name,user.avatar_url,null,user.blog,user.email));
  }
}
Program: 62939
Project: 62939
Buggy source:
public TranslatorsInfoData(XmlResourceParser parser) throws XmlPullParserException, IOException {
  super(R.layout.item_attribouter_translators);
  translators=new ArrayList<>();
  translatorsTitle=parser.getAttributeValue(null,"String_Node_Str");
  if (translatorsTitle == null)   translatorsTitle="String_Node_Str";
  overflow=parser.getAttributeIntValue(null,"String_Node_Str",-1);
  addChildren(parser);
}

Fixed version (ground truth):
public TranslatorsInfoData(XmlResourceParser parser) throws XmlPullParserException, IOException {
  super(R.layout.item_attribouter_translators);
  translatorsTitle=parser.getAttributeValue(null,"String_Node_Str");
  if (translatorsTitle == null)   translatorsTitle="String_Node_Str";
  overflow=parser.getAttributeIntValue(null,"String_Node_Str",-1);
  addChildren(parser);
}
Program: 62941
Project: 62941
Buggy source:
ContributorInfoData(@Nullable String login,@Nullable String name,@Nullable String avatarUrl,@Nullable String task,@Nullable Integer position,@Nullable String bio,@Nullable String blog,@Nullable String email){
  super(R.layout.item_attribouter_contributor);
  this.login=login != null ? login.toLowerCase() : null;
  this.name=name;
  this.avatarUrl=avatarUrl;
  this.task=task;
  this.position=position;
  this.bio=bio;
  this.blog=blog;
  this.email=email;
  links=new ArrayList<>();
  if (login != null)   links.add(new GitHubLinkInfoData(login,1));
  if (blog != null)   links.add(new WebsiteLinkInfoData(blog,2));
  if (email != null)   links.add(new EmailLinkInfoData(email,-1));
}

Fixed version (ground truth):
ContributorInfoData(@Nullable String login,@Nullable String name,@Nullable String avatarUrl,@Nullable String task,@Nullable Integer position,@Nullable String bio,@Nullable String blog,@Nullable String email){
  super(R.layout.item_attribouter_contributor);
  this.login=login;
  this.name=name;
  this.avatarUrl=avatarUrl;
  this.task=task;
  this.position=position;
  this.bio=bio;
  this.blog=blog;
  this.email=email;
  links=new ArrayList<>();
  if (login != null)   links.add(new GitHubLinkInfoData(login,1));
  if (blog != null)   links.add(new WebsiteLinkInfoData(blog,2));
  if (email != null)   links.add(new EmailLinkInfoData(email,-1));
}
Program: 62942
Project: 62942
Buggy source:
@Override public boolean equals(Object obj){
  return obj instanceof ContributorInfoData && (login != null ? login.equals(((ContributorInfoData)obj).login) : super.equals(obj));
}

Fixed version (ground truth):
@Override public boolean equals(Object obj){
  if (obj instanceof ContributorInfoData) {
    ContributorInfoData contributor=(ContributorInfoData)obj;
    return (login != null && contributor.login != null && login.toLowerCase().equals(contributor.login.toLowerCase())) || super.equals(obj);
  }
 else   return super.equals(obj);
}
Program: 62943
Project: 62943
Buggy source:
public LicenseInfoData(@Nullable String repo,@Nullable String title,@Nullable String description,@Nullable String licenseName,@Nullable String websiteUrl,@Nullable String gitHubUrl,@Nullable String licenseUrl,@Nullable String[] licensePermissions,@Nullable String[] licenseConditions,@Nullable String[] licenseLimitations,@Nullable String licenseDescription,@Nullable String licenseBody,@Nullable String licenseKey){
  super(R.layout.item_attribouter_license);
  this.repo=repo != null ? repo.toLowerCase() : repo;
  this.title=title;
  this.description=description;
  this.licenseName=licenseName;
  this.websiteUrl=websiteUrl;
  this.gitHubUrl=gitHubUrl;
  this.licenseUrl=licenseUrl;
  this.licensePermissions=licensePermissions;
  this.licenseConditions=licenseConditions;
  this.licenseLimitations=licenseLimitations;
  this.licenseDescription=licenseDescription;
  this.licenseBody=licenseBody;
  this.licenseKey=licenseKey;
  if (repo != null)   token=repo;
 else   token=title;
  links=new ArrayList<>();
  if (websiteUrl != null && !websiteUrl.isEmpty())   links.add(new WebsiteLinkInfoData(websiteUrl,2));
  if (repo != null)   links.add(new GitHubLinkInfoData(repo,1));
  if (licenseBody != null || licenseUrl != null)   links.add(new LicenseLinkInfoData(this,0));
}

Fixed version (ground truth):
public LicenseInfoData(@Nullable String repo,@Nullable String title,@Nullable String description,@Nullable String licenseName,@Nullable String websiteUrl,@Nullable String gitHubUrl,@Nullable String licenseUrl,@Nullable String[] licensePermissions,@Nullable String[] licenseConditions,@Nullable String[] licenseLimitations,@Nullable String licenseDescription,@Nullable String licenseBody,@Nullable String licenseKey){
  super(R.layout.item_attribouter_license);
  this.repo=repo;
  this.title=title;
  this.description=description;
  this.licenseName=licenseName;
  this.websiteUrl=websiteUrl;
  this.gitHubUrl=gitHubUrl;
  this.licenseUrl=licenseUrl;
  this.licensePermissions=licensePermissions;
  this.licenseConditions=licenseConditions;
  this.licenseLimitations=licenseLimitations;
  this.licenseDescription=licenseDescription;
  this.licenseBody=licenseBody;
  this.licenseKey=licenseKey;
  if (repo != null)   token=repo;
 else   token=title;
  links=new ArrayList<>();
  if (websiteUrl != null && !websiteUrl.isEmpty())   links.add(new WebsiteLinkInfoData(websiteUrl,2));
  if (repo != null)   links.add(new GitHubLinkInfoData(repo,1));
  if (licenseBody != null || licenseUrl != null)   links.add(new LicenseLinkInfoData(this,0));
}
Program: 62944
Project: 62944
Buggy source:
@Override public boolean equals(Object obj){
  return obj instanceof LicenseInfoData && (repo != null ? repo.equals(((LicenseInfoData)obj).repo) || repo.equals(((LicenseInfoData)obj).title) : (title != null ? title.equals(((LicenseInfoData)obj).repo) : super.equals(obj)));
}

Fixed version (ground truth):
@Override public boolean equals(Object obj){
  if (obj instanceof LicenseInfoData) {
    LicenseInfoData license=(LicenseInfoData)obj;
    return (repo != null && ((license.repo != null && repo.toLowerCase().equals(license.repo.toLowerCase())) || (license.title != null && repo.toLowerCase().equals(license.title.toLowerCase())))) || (title != null && ((license.repo != null && title.toLowerCase().equals(license.repo.toLowerCase())) || license.title != null && title.toLowerCase().equals(license.title.toLowerCase()))) || super.equals(obj);
  }
 else   return super.equals(obj);
}
Program: 62945
Project: 62945
Buggy source:
@Override public boolean equals(Object obj){
  return obj instanceof TranslatorInfoData && (login != null ? login.equals(((TranslatorInfoData)obj).login) : super.equals(obj));
}

Fixed version (ground truth):
@Override public boolean equals(Object obj){
  if (obj instanceof TranslatorInfoData) {
    TranslatorInfoData translator=(TranslatorInfoData)obj;
    return (login != null && translator.login != null && login.toLowerCase().equals(translator.login.toLowerCase())) || super.equals(obj);
  }
 else   return super.equals(obj);
}
Program: 62946
Project: 62946
Buggy source:
@Override public void bind(Context context,ViewHolder viewHolder){
  ApplicationInfo info=context.getApplicationInfo();
  ResourceUtils.setImage(context,icon,info.icon,viewHolder.appIconView);
  viewHolder.nameTextView.setText(info.labelRes);
  try {
    PackageInfo packageInfo=context.getPackageManager().getPackageInfo(info.packageName,0);
    viewHolder.versionTextView.setText(String.format(context.getString(R.string.title_attribouter_version),packageInfo.versionName));
    viewHolder.versionTextView.setVisibility(View.VISIBLE);
  }
 catch (  PackageManager.NameNotFoundException e) {
    viewHolder.versionTextView.setVisibility(View.GONE);
  }
  if (description != null) {
    viewHolder.descriptionTextView.setVisibility(View.VISIBLE);
    viewHolder.descriptionTextView.setText(ResourceUtils.getString(context,description));
  }
 else   viewHolder.descriptionTextView.setVisibility(View.GONE);
  if (links.size() > 0) {
    viewHolder.links.setVisibility(View.VISIBLE);
    FlexboxLayoutManager layoutManager=new FlexboxLayoutManager(context);
    layoutManager.setFlexDirection(FlexDirection.ROW);
    layoutManager.setJustifyContent(JustifyContent.CENTER);
    viewHolder.links.setLayoutManager(layoutManager);
    viewHolder.links.setAdapter(new InfoAdapter(new ArrayList<InfoData>(links)));
  }
 else   viewHolder.links.setVisibility(View.GONE);
}

Fixed version (ground truth):
@Override public void bind(Context context,ViewHolder viewHolder){
  ApplicationInfo info=context.getApplicationInfo();
  ResourceUtils.setImage(context,icon,info.icon,viewHolder.appIconView);
  viewHolder.nameTextView.setText(info.labelRes);
  try {
    PackageInfo packageInfo=context.getPackageManager().getPackageInfo(info.packageName,0);
    viewHolder.versionTextView.setText(String.format(context.getString(R.string.title_attribouter_version),packageInfo.versionName));
    viewHolder.versionTextView.setVisibility(View.VISIBLE);
  }
 catch (  PackageManager.NameNotFoundException e) {
    viewHolder.versionTextView.setVisibility(View.GONE);
  }
  if (description != null) {
    viewHolder.descriptionTextView.setVisibility(View.VISIBLE);
    viewHolder.descriptionTextView.setText(ResourceUtils.getString(context,description));
  }
 else   viewHolder.descriptionTextView.setVisibility(View.GONE);
  if (links.size() > 0) {
    Collections.sort(links);
    viewHolder.links.setVisibility(View.VISIBLE);
    FlexboxLayoutManager layoutManager=new FlexboxLayoutManager(context);
    layoutManager.setFlexDirection(FlexDirection.ROW);
    layoutManager.setJustifyContent(JustifyContent.CENTER);
    viewHolder.links.setLayoutManager(layoutManager);
    viewHolder.links.setAdapter(new InfoAdapter(new ArrayList<InfoData>(links)));
  }
 else   viewHolder.links.setVisibility(View.GONE);
}
Program: 62947
Project: 62947
Buggy source:
@Override public void bind(Context context,ViewHolder viewHolder){
  viewHolder.titleView.setText(ResourceUtils.getString(context,getName()));
  viewHolder.descriptionView.setText(ResourceUtils.getString(context,description));
  if (licenseName != null) {
    viewHolder.licenseView.setVisibility(View.VISIBLE);
    viewHolder.licenseView.setText(ResourceUtils.getString(context,licenseName));
  }
 else   viewHolder.licenseView.setVisibility(View.GONE);
  if (links.size() > 0) {
    viewHolder.links.setVisibility(View.VISIBLE);
    FlexboxLayoutManager layoutManager=new FlexboxLayoutManager(context);
    layoutManager.setFlexDirection(FlexDirection.ROW);
    layoutManager.setJustifyContent(JustifyContent.FLEX_START);
    viewHolder.links.setLayoutManager(layoutManager);
    viewHolder.links.setAdapter(new InfoAdapter(new ArrayList<InfoData>(links)));
  }
 else   viewHolder.links.setVisibility(View.GONE);
  LinkInfoData importantLink=null;
  for (  LinkInfoData link : links) {
    if (importantLink == null || link.getPriority() > importantLink.getPriority())     importantLink=link;
  }
  viewHolder.itemView.setOnClickListener(importantLink != null ? importantLink.getListener(context) : null);
}

Fixed version (ground truth):
@Override public void bind(Context context,ViewHolder viewHolder){
  viewHolder.titleView.setText(ResourceUtils.getString(context,getName()));
  viewHolder.descriptionView.setText(ResourceUtils.getString(context,description));
  if (licenseName != null) {
    viewHolder.licenseView.setVisibility(View.VISIBLE);
    viewHolder.licenseView.setText(ResourceUtils.getString(context,licenseName));
  }
 else   viewHolder.licenseView.setVisibility(View.GONE);
  if (links.size() > 0) {
    Collections.sort(links);
    viewHolder.links.setVisibility(View.VISIBLE);
    FlexboxLayoutManager layoutManager=new FlexboxLayoutManager(context);
    layoutManager.setFlexDirection(FlexDirection.ROW);
    layoutManager.setJustifyContent(JustifyContent.FLEX_START);
    viewHolder.links.setLayoutManager(layoutManager);
    viewHolder.links.setAdapter(new InfoAdapter(new ArrayList<InfoData>(links)));
  }
 else   viewHolder.links.setVisibility(View.GONE);
  LinkInfoData importantLink=null;
  for (  LinkInfoData link : links) {
    if (importantLink == null || link.getPriority() > importantLink.getPriority())     importantLink=link;
  }
  viewHolder.itemView.setOnClickListener(importantLink != null ? importantLink.getListener(context) : null);
}
Program: 62948
Project: 62948
Buggy source:
@Override protected void onCreate(Bundle savedInstanceState){
  super.onCreate(savedInstanceState);
  setContentView(R.layout.dialog_attribouter_user);
  TextView nameView=findViewById(R.id.name);
  TextView taskView=findViewById(R.id.task);
  ImageView imageView=findViewById(R.id.image);
  TextView bioView=findViewById(R.id.description);
  RecyclerView links=findViewById(R.id.links);
  nameView.setText(ResourceUtils.getString(getContext(),contributor.getName()));
  taskView.setText(ResourceUtils.getString(getContext(),contributor.task));
  String url=ResourceUtils.getString(getContext(),contributor.avatarUrl);
  if (url != null)   ResourceUtils.setImage(getContext(),contributor.avatarUrl,imageView);
 else   imageView.setVisibility(View.GONE);
  bioView.setText(ResourceUtils.getString(getContext(),contributor.bio));
  if (contributor.links.size() > 0) {
    links.setVisibility(View.VISIBLE);
    FlexboxLayoutManager layoutManager=new FlexboxLayoutManager(getContext());
    layoutManager.setFlexDirection(FlexDirection.ROW);
    layoutManager.setJustifyContent(JustifyContent.FLEX_START);
    links.setLayoutManager(layoutManager);
    links.setAdapter(new InfoAdapter(new ArrayList<InfoData>(contributor.links)));
  }
 else   links.setVisibility(View.GONE);
}

Fixed version (ground truth):
@Override protected void onCreate(Bundle savedInstanceState){
  super.onCreate(savedInstanceState);
  setContentView(R.layout.dialog_attribouter_user);
  TextView nameView=findViewById(R.id.name);
  TextView taskView=findViewById(R.id.task);
  ImageView imageView=findViewById(R.id.image);
  TextView bioView=findViewById(R.id.description);
  RecyclerView links=findViewById(R.id.links);
  nameView.setText(ResourceUtils.getString(getContext(),contributor.getName()));
  taskView.setText(ResourceUtils.getString(getContext(),contributor.task));
  String url=ResourceUtils.getString(getContext(),contributor.avatarUrl);
  if (url != null)   ResourceUtils.setImage(getContext(),contributor.avatarUrl,imageView);
 else   imageView.setVisibility(View.GONE);
  bioView.setText(ResourceUtils.getString(getContext(),contributor.bio));
  if (contributor.links.size() > 0) {
    Collections.sort(contributor.links);
    links.setVisibility(View.VISIBLE);
    FlexboxLayoutManager layoutManager=new FlexboxLayoutManager(getContext());
    layoutManager.setFlexDirection(FlexDirection.ROW);
    layoutManager.setJustifyContent(JustifyContent.FLEX_START);
    links.setLayoutManager(layoutManager);
    links.setAdapter(new InfoAdapter(new ArrayList<InfoData>(contributor.links)));
  }
 else   links.setVisibility(View.GONE);
}
Program: 62951
Project: 62951
Buggy source:
public void merge(ContributorInfoData contributor){
  if ((name == null || !name.startsWith("String_Node_Str")) && contributor.name != null)   name=contributor.name;
  if ((avatarUrl == null || !avatarUrl.startsWith("String_Node_Str")) && contributor.avatarUrl != null)   avatarUrl=contributor.avatarUrl;
  if ((bio == null || !bio.startsWith("String_Node_Str")) && contributor.bio != null)   bio=contributor.bio;
  if ((blog == null || !blog.startsWith("String_Node_Str")) && contributor.blog != null)   blog=contributor.blog;
  if ((task == null || !task.startsWith("String_Node_Str")) && contributor.task != null)   task=contributor.task;
}

Fixed version (ground truth):
public void merge(ContributorInfoData contributor){
  if ((name == null || !name.startsWith("String_Node_Str")) && contributor.name != null)   name=contributor.name;
  if ((avatarUrl == null || !avatarUrl.startsWith("String_Node_Str")) && contributor.avatarUrl != null)   avatarUrl=contributor.avatarUrl;
  if ((bio == null || !bio.startsWith("String_Node_Str")) && contributor.bio != null && !contributor.bio.isEmpty())   bio=contributor.bio;
  if ((blog == null || !blog.startsWith("String_Node_Str")) && contributor.blog != null && !contributor.blog.isEmpty())   blog=contributor.blog;
  if ((task == null || !task.startsWith("String_Node_Str")) && contributor.task != null)   task=contributor.task;
}
Program: 62952
Project: 62952
Buggy source:
public void merge(LicenseInfoData license){
  if ((title == null || !title.startsWith("String_Node_Str")) && license.title != null)   title=license.title;
  if ((description == null || !description.startsWith("String_Node_Str")) && license.description != null)   description=license.description;
  if ((licenseName == null || !licenseName.startsWith("String_Node_Str")) && license.licenseName != null)   licenseName=license.licenseName;
  if ((websiteUrl == null || !websiteUrl.startsWith("String_Node_Str")) && license.websiteUrl != null)   websiteUrl=license.websiteUrl;
  if ((gitHubUrl == null || !gitHubUrl.startsWith("String_Node_Str")) && license.gitHubUrl != null)   gitHubUrl=license.gitHubUrl;
  if ((licenseUrl == null || !licenseUrl.startsWith("String_Node_Str")) && license.licenseUrl != null)   licenseUrl=license.licenseUrl;
  if (license.licensePermissions != null)   licensePermissions=license.licensePermissions;
  if (license.licenseConditions != null)   licenseConditions=license.licenseConditions;
  if (license.licenseLimitations != null)   licenseLimitations=license.licenseLimitations;
  if (license.licenseDescription != null)   licenseDescription=license.licenseDescription;
  if ((licenseBody == null || !licenseBody.startsWith("String_Node_Str")) && license.licenseBody != null)   licenseBody=license.licenseBody;
}

Fixed version (ground truth):
public void merge(LicenseInfoData license){
  if ((title == null || !title.startsWith("String_Node_Str")) && license.title != null && !license.title.isEmpty())   title=license.title;
  if ((description == null || !description.startsWith("String_Node_Str")) && license.description != null && !license.description.isEmpty())   description=license.description;
  if ((licenseName == null || !licenseName.startsWith("String_Node_Str")) && license.licenseName != null)   licenseName=license.licenseName;
  if ((websiteUrl == null || !websiteUrl.startsWith("String_Node_Str")) && license.websiteUrl != null && !license.websiteUrl.isEmpty())   websiteUrl=license.websiteUrl;
  if ((gitHubUrl == null || !gitHubUrl.startsWith("String_Node_Str")) && license.gitHubUrl != null)   gitHubUrl=license.gitHubUrl;
  if ((licenseUrl == null || !licenseUrl.startsWith("String_Node_Str")) && license.licenseUrl != null)   licenseUrl=license.licenseUrl;
  if (license.licensePermissions != null)   licensePermissions=license.licensePermissions;
  if (license.licenseConditions != null)   licenseConditions=license.licenseConditions;
  if (license.licenseLimitations != null)   licenseLimitations=license.licenseLimitations;
  if (license.licenseDescription != null)   licenseDescription=license.licenseDescription;
  if ((licenseBody == null || !licenseBody.startsWith("String_Node_Str")) && license.licenseBody != null)   licenseBody=license.licenseBody;
}
Program: 62954
Project: 62954
Buggy source:
@Override public boolean equals(Object obj){
  return obj instanceof LicenseInfoData && (repo != null ? repo.equals(((LicenseInfoData)obj).repo) : super.equals(obj));
}

Fixed version (ground truth):
@Override public boolean equals(Object obj){
  return obj instanceof LicenseInfoData && (repo != null ? repo.equals(((LicenseInfoData)obj).repo) || repo.equals(((LicenseInfoData)obj).title) : (title != null ? title.equals(((LicenseInfoData)obj).repo) : super.equals(obj)));
}
Program: 62956
Project: 62956
Buggy source:
GitHubData(String url){
  this.url=url;
  listeners=new ArrayList<>();
  tags=new ArrayList<>();
  gson=new GsonBuilder().registerTypeAdapter(getClass(),new MootInstanceCreator(this)).registerTypeAdapter(String.class,new NonEmptyStringStringAdapter()).create();
}

Fixed version (ground truth):
GitHubData(String url){
  this.url=url;
  listeners=new ArrayList<>();
  tags=new ArrayList<>();
  gson=new GsonBuilder().registerTypeAdapter(getClass(),new MootInstanceCreator(this)).create();
}
Program: 62957
Project: 62957
Buggy source:
protected void addRequest(GitHubData request){
  request.addOnInitListener(this);
  if (!requests.contains(request))   requests.add(request);
  if (listener != null)   listener.onRequest(this,request);
}

Fixed version (ground truth):
protected void addRequest(GitHubData request){
  request.addOnInitListener(this);
  requests.add(request);
  if (listener != null)   listener.onRequest(this,request);
}
Program: 62958
Project: 62958
Buggy source:
public LicenseInfoData(@Nullable String repo,@Nullable String title,@Nullable String description,@Nullable String licenseName,@Nullable String websiteUrl,@Nullable String gitHubUrl,@Nullable String licenseUrl,@Nullable String[] licensePermissions,@Nullable String[] licenseConditions,@Nullable String[] licenseLimitations,@Nullable String licenseDescription,@Nullable String licenseBody,@Nullable String licenseKey){
  super(R.layout.item_attribouter_license);
  this.repo=repo;
  this.title=title;
  this.description=description;
  this.licenseName=licenseName;
  this.websiteUrl=websiteUrl;
  this.gitHubUrl=gitHubUrl;
  this.licenseUrl=licenseUrl;
  this.licensePermissions=licensePermissions;
  this.licenseConditions=licenseConditions;
  this.licenseLimitations=licenseLimitations;
  this.licenseDescription=licenseDescription;
  this.licenseBody=licenseBody;
  this.licenseKey=licenseKey;
}

Fixed version (ground truth):
public LicenseInfoData(@Nullable String repo,@Nullable String title,@Nullable String description,@Nullable String licenseName,@Nullable String websiteUrl,@Nullable String gitHubUrl,@Nullable String licenseUrl,@Nullable String[] licensePermissions,@Nullable String[] licenseConditions,@Nullable String[] licenseLimitations,@Nullable String licenseDescription,@Nullable String licenseBody,@Nullable String licenseKey){
  super(R.layout.item_attribouter_license);
  this.repo=repo;
  this.title=title;
  this.description=description;
  this.licenseName=licenseName;
  this.websiteUrl=websiteUrl;
  this.gitHubUrl=gitHubUrl;
  this.licenseUrl=licenseUrl;
  this.licensePermissions=licensePermissions;
  this.licenseConditions=licenseConditions;
  this.licenseLimitations=licenseLimitations;
  this.licenseDescription=licenseDescription;
  this.licenseBody=licenseBody;
  this.licenseKey=licenseKey;
  if (repo != null)   token=repo;
 else   token=title;
}
Program: 62960
Project: 62960
Buggy source:
@Override public void onInit(GitHubData data){
  if (data instanceof RepositoryData) {
    RepositoryData repo=(RepositoryData)data;
    for (    String tag : repo.getTags()) {
      LicenseInfoData mergeLicense=new LicenseInfoData(tag,null,repo.description,repo.license != null ? repo.license.name : null,repo.homepage,"String_Node_Str" + tag,null,null,null,null,null,null,null);
      if (licenses.contains(mergeLicense)) {
        LicenseInfoData license=licenses.get(licenses.indexOf(mergeLicense));
        license.merge(mergeLicense);
        if (repo.license != null && repo.license.key != null && !license.hasEverythingLicense()) {
          LicenseData request=new LicenseData(repo.license.key);
          request.addTag(tag);
          addRequest(request);
        }
        break;
      }
    }
  }
 else   if (data instanceof LicenseData) {
    LicenseData license=(LicenseData)data;
    for (    String tag : license.getTags()) {
      LicenseInfoData mergeLicense=new LicenseInfoData(tag,null,null,license.name,null,"String_Node_Str" + tag,license.html_url,license.permissions,license.conditions,license.limitations,license.description,license.body,license.key);
      if (licenses.contains(mergeLicense))       licenses.get(licenses.indexOf(mergeLicense)).merge(mergeLicense);
    }
  }
}

Fixed version (ground truth):
@Override public void onInit(GitHubData data){
  if (data instanceof RepositoryData) {
    RepositoryData repo=(RepositoryData)data;
    for (    String tag : repo.getTags()) {
      LicenseInfoData mergeLicense=new LicenseInfoData(tag,null,repo.description,repo.license != null ? repo.license.name : null,repo.homepage,"String_Node_Str" + tag,null,null,null,null,null,null,null);
      if (licenses.contains(mergeLicense)) {
        LicenseInfoData license=licenses.get(licenses.indexOf(mergeLicense));
        license.merge(mergeLicense);
        if (repo.license != null && repo.license.key != null && !license.hasEverythingLicense()) {
          LicenseData request=new LicenseData(repo.license.key);
          request.addTag(tag);
          addRequest(request);
        }
        break;
      }
    }
  }
 else   if (data instanceof LicenseData) {
    LicenseData license=(LicenseData)data;
    for (    LicenseInfoData licenseInfo : licenses) {
      if (license.getTags().contains(licenseInfo.token)) {
        licenseInfo.merge(new LicenseInfoData(null,null,null,license.name,null,"String_Node_Str" + licenseInfo.repo,license.html_url,license.permissions,license.conditions,license.limitations,license.description,license.body,license.key));
      }
    }
  }
}
Program: 62961
Project: 62961
Buggy source:
@Override public void onRequest(InfoData info,GitHubData request){
  if (!requests.contains(request))   requests.add(request);
 else {
    int i=requests.indexOf(request);
    GitHubData activeRequest=requests.get(i);
    if (activeRequest.isInitialized()) {
      info.onInit(activeRequest);
    }
 else     requests.set(i,requests.get(i).merge(request));
  }
}

Fixed version (ground truth):
@Override public void onRequest(InfoData info,GitHubData request){
  if (!requests.contains(request)) {
    requests.add(request);
    request.addOnInitListener(this);
    request.startInit();
  }
 else {
    int i=requests.indexOf(request);
    GitHubData activeRequest=requests.get(i);
    if (activeRequest.isInitialized()) {
      info.onInit(activeRequest);
    }
 else     requests.set(i,requests.get(i).merge(request));
  }
}
Program: 62962
Project: 62962
Buggy source:
@RequestMapping(value="String_Node_Str",produces="String_Node_Str") public ModelAndView orderFeed(WebRequest webRequest,HttpServletResponse response){
  response.setDateHeader("String_Node_Str",personRatingRepository.lastUpdate().getTime());
  Sort sort=new Sort(Sort.Direction.ASC,"String_Node_Str");
  return new ModelAndView(new PersonRatingAtomFeedView(personRatingRepository),"String_Node_Str",personRatingRepository.findAll(sort));
}

Fixed version (ground truth):
@RequestMapping(value="String_Node_Str",produces="String_Node_Str") public ModelAndView orderFeed(WebRequest webRequest,HttpServletResponse response){
  Date lastUpdate=personRatingRepository.lastUpdate();
  if (lastUpdate != null) {
    response.setDateHeader("String_Node_Str",lastUpdate.getTime());
  }
  Sort sort=new Sort(Sort.Direction.ASC,"String_Node_Str");
  return new ModelAndView(new PersonRatingAtomFeedView(personRatingRepository),"String_Node_Str",personRatingRepository.findAll(sort));
}
Program: 62963
Project: 62963
Buggy source:
private void init(){
  this.pattern=this.datePicker.getDateTimeFormatInfo().dateFormatFull();
  this.datePicker.addDateSelectionHandler((date,dateTimeFormatInfo) -> {
    setStringValue(date,dateTimeFormatInfo);
    changeLabelFloating();
    autoValidate();
  }
);
  this.modalListener=evt -> modal.open();
  onDetach(asElement(),mutationRecord -> {
    if (nonNull(popover))     popover.discard();
    if (nonNull(modal)) {
      modal.close();
      modal.asElement().remove();
    }
  }
);
  datePicker.addCloseHandler(() -> {
    if (nonNull(popover))     popover.close();
    if (nonNull(modal) && modal.isOpen())     modal.close();
  }
);
  datePicker.addClearHandler(() -> setValue(null));
  setPickerStyle(PickerStyle.MODAL);
  datePicker.setBackgroundHandler((oldBackground,newBackground) -> {
    if (nonNull(modal)) {
      modal.getHeaderContainerElement().classList.remove(oldBackground.color().getStyle());
      modal.getHeaderContainerElement().classList.add(newBackground.color().getStyle());
    }
    if (nonNull(popover)) {
      popover.getHeadingElement().classList.remove(oldBackground.color().getStyle());
      popover.getHeadingElement().classList.add(newBackground.color().getStyle());
    }
  }
);
  getInputElement().addEventListener(EventType.keypress.getName(),evt -> {
    KeyboardEvent keyboardEvent=Js.cast(evt);
    if (isEnterKey(keyboardEvent) || isSpaceKey(keyboardEvent)) {
      open();
    }
  }
);
}

Fixed version (ground truth):
private void init(){
  this.pattern=this.datePicker.getDateTimeFormatInfo().dateFormatFull();
  this.datePicker.addDateSelectionHandler((date,dateTimeFormatInfo) -> {
    setStringValue(date,dateTimeFormatInfo);
    changeLabelFloating();
    autoValidate();
  }
);
  this.modalListener=evt -> modal.open();
  ElementUtil.onDetach(asElement(),mutationRecord -> {
    if (nonNull(popover))     popover.discard();
    if (nonNull(modal)) {
      modal.close();
      modal.asElement().remove();
    }
  }
);
  datePicker.addCloseHandler(() -> {
    if (nonNull(popover))     popover.close();
    if (nonNull(modal) && modal.isOpen())     modal.close();
  }
);
  datePicker.addClearHandler(() -> setValue(null));
  setPickerStyle(PickerStyle.MODAL);
  datePicker.setBackgroundHandler((oldBackground,newBackground) -> {
    if (nonNull(modal)) {
      modal.getHeaderContainerElement().classList.remove(oldBackground.color().getStyle());
      modal.getHeaderContainerElement().classList.add(newBackground.color().getStyle());
    }
    if (nonNull(popover)) {
      popover.getHeadingElement().classList.remove(oldBackground.color().getStyle());
      popover.getHeadingElement().classList.add(newBackground.color().getStyle());
    }
  }
);
  getInputElement().addEventListener(EventType.keypress.getName(),evt -> {
    KeyboardEvent keyboardEvent=Js.cast(evt);
    if (isEnterKey(keyboardEvent) || isSpaceKey(keyboardEvent)) {
      open();
    }
  }
);
}
Program: 62964
Project: 62964
Buggy source:
public Popover(HTMLElement target,String title,Node content){
  this.targetElement=target;
  element.appendChild(arrowElement);
  element.appendChild(headingElement);
  element.appendChild(contentElement);
  headerText=new Text(title);
  headingElement.appendChild(headerText);
  contentElement.appendChild(content);
  showListener=evt -> {
    evt.stopPropagation();
    show();
  }
;
  target.addEventListener(EventType.click.getName(),showListener);
  closeListener=evt -> closeAll();
  DomGlobal.document.body.addEventListener(EventType.click.getName(),closeListener);
  element.addEventListener(EventType.click.getName(),Event::stopPropagation);
  onDetach(targetElement,mutationRecord -> element.remove());
}

Fixed version (ground truth):
public Popover(HTMLElement target,String title,Node content){
  this.targetElement=target;
  element.appendChild(arrowElement);
  element.appendChild(headingElement);
  element.appendChild(contentElement);
  headerText=new Text(title);
  headingElement.appendChild(headerText);
  contentElement.appendChild(content);
  showListener=evt -> {
    evt.stopPropagation();
    show();
  }
;
  target.addEventListener(EventType.click.getName(),showListener);
  closeListener=evt -> closeAll();
  DomGlobal.document.body.addEventListener(EventType.click.getName(),closeListener);
  element.addEventListener(EventType.click.getName(),Event::stopPropagation);
  ElementUtil.onDetach(targetElement,mutationRecord -> element.remove());
}
Program: 62965
Project: 62965
Buggy source:
public Tooltip(HTMLElement targetElement,Node content){
  element.appendChild(arrowElement);
  element.appendChild(innerElement);
  innerElement.appendChild(content);
  element.classList.add(popupPosition.getDirectionClass());
  targetElement.addEventListener(EventType.mouseenter.getName(),evt -> {
    evt.stopPropagation();
    document.body.appendChild(element);
    element.classList.remove("String_Node_Str","String_Node_Str");
    element.classList.add("String_Node_Str","String_Node_Str");
    popupPosition.position(element,targetElement);
    position(popupPosition);
  }
);
  onDetach(targetElement,mutationRecord -> element.remove());
  targetElement.addEventListener(EventType.mouseleave.getName(),evt1 -> element.remove());
}

Fixed version (ground truth):
public Tooltip(HTMLElement targetElement,Node content){
  element.appendChild(arrowElement);
  element.appendChild(innerElement);
  innerElement.appendChild(content);
  element.classList.add(popupPosition.getDirectionClass());
  targetElement.addEventListener(EventType.mouseenter.getName(),evt -> {
    evt.stopPropagation();
    document.body.appendChild(element);
    element.classList.remove("String_Node_Str","String_Node_Str");
    element.classList.add("String_Node_Str","String_Node_Str");
    popupPosition.position(element,targetElement);
    position(popupPosition);
  }
);
  ElementUtil.onDetach(targetElement,mutationRecord -> element.remove());
  targetElement.addEventListener(EventType.mouseleave.getName(),evt1 -> element.remove());
}
Program: 62966
Project: 62966
Buggy source:
private void init(){
  this.timePicker.addTimeSelectionHandler((time,dateTimeFormatInfo,picker) -> {
    setStringValue(time,picker);
    changeLabelFloating();
    autoValidate();
  }
);
  this.modalListener=evt -> modal.open();
  this.keyboardModalListener=event -> {
    event.stopPropagation();
    KeyboardEvent keyboardEvent=Js.cast(event);
    if (keyboardEvent.code.equals("String_Node_Str")) {
      modal.open();
    }
 else     if (keyboardEvent.code.equals("String_Node_Str")) {
      modal.close();
    }
  }
;
  onDetach(asElement(),mutationRecord -> {
    if (nonNull(popover))     popover.discard();
    if (nonNull(modal)) {
      modal.close();
      modal.asElement().remove();
    }
  }
);
  timePicker.addCloseHandler(() -> {
    if (nonNull(popover))     popover.close();
    if (nonNull(modal) && modal.isOpen())     modal.close();
  }
);
  timePicker.addClearHandler(() -> setValue(null));
  setPickerStyle(PickerStyle.MODAL);
}

Fixed version (ground truth):
private void init(){
  this.timePicker.addTimeSelectionHandler((time,dateTimeFormatInfo,picker) -> {
    setStringValue(time,picker);
    changeLabelFloating();
    autoValidate();
  }
);
  this.modalListener=evt -> modal.open();
  this.keyboardModalListener=event -> {
    event.stopPropagation();
    KeyboardEvent keyboardEvent=Js.cast(event);
    if (keyboardEvent.code.equals("String_Node_Str")) {
      modal.open();
    }
 else     if (keyboardEvent.code.equals("String_Node_Str")) {
      modal.close();
    }
  }
;
  ElementUtil.onDetach(asElement(),mutationRecord -> {
    if (nonNull(popover))     popover.discard();
    if (nonNull(modal)) {
      modal.close();
      modal.asElement().remove();
    }
  }
);
  timePicker.addCloseHandler(() -> {
    if (nonNull(popover))     popover.close();
    if (nonNull(modal) && modal.isOpen())     modal.close();
  }
);
  timePicker.addClearHandler(() -> setValue(null));
  setPickerStyle(PickerStyle.MODAL);
}
Program: 62967
Project: 62967
Buggy source:
@Override public void onBeforeAddHeaders(DataTable<T> dataTable){
  this.dataTable=dataTable;
  ColumnConfig<T> column=ColumnConfig.<T>create("String_Node_Str").setSortable(false).setWidth("String_Node_Str").setFixed(true).setCellRenderer(cell -> {
    applyStyles(cell);
    DetailsButtonElement<T> detailsButtonElement=new DetailsButtonElement<>(expandIcon,collapseIcon,RecordDetailsPlugin.this,cell);
    cell.getTableRow().addMetaObject(detailsButtonElement);
    applyStyles(cell);
    return detailsButtonElement.asElement();
  }
).setHeaderElement(columnTitle -> {
    HTMLElement htmlElement=IconButton.create(expandIcon.copy()).linkify().disable().asElement();
    Style.of(htmlElement).setProperty("String_Node_Str","String_Node_Str").setHeight("String_Node_Str").setMarginLeft("String_Node_Str");
    return htmlElement;
  }
).asHeader().textAlign("String_Node_Str");
  setupColumn(column);
  dataTable.getTableConfig().insertColumnFirst(column);
}

Fixed version (ground truth):
@Override public void onBeforeAddHeaders(DataTable<T> dataTable){
  this.dataTable=dataTable;
  ColumnConfig<T> column=ColumnConfig.<T>create("String_Node_Str").setSortable(false).setWidth("String_Node_Str").setFixed(true).setCellRenderer(cell -> {
    applyStyles(cell);
    DetailsButtonElement<T> detailsButtonElement=new DetailsButtonElement<>(expandIcon,collapseIcon,RecordDetailsPlugin.this,cell);
    cell.getTableRow().addMetaObject(detailsButtonElement);
    applyStyles(cell);
    return detailsButtonElement.asElement();
  }
).setHeaderElement(columnTitle -> {
    HTMLElement htmlElement=IconButton.create(expandIcon.copy()).linkify().disable().asElement();
    Style.of(htmlElement).setProperty("String_Node_Str","String_Node_Str").setHeight("String_Node_Str");
    return htmlElement;
  }
).asHeader().textAlign("String_Node_Str");
  setupColumn(column);
  dataTable.getTableConfig().insertColumnFirst(column);
}
Program: 62969
Project: 62969
Buggy source:
private CheckBox createCheckBox(){
  CheckBox checkBox=CheckBox.create();
  if (nonNull(colorScheme)) {
    checkBox.setColor(colorScheme.color());
  }
  Style.of(checkBox).setMargin("String_Node_Str");
  Style.of(checkBox.getInputElement()).setMargin("String_Node_Str");
  Style.of(checkBox.getLabelElement()).css("String_Node_Str").setMargin("String_Node_Str").setHeight("String_Node_Str");
  return checkBox;
}

Fixed version (ground truth):
private CheckBox createCheckBox(){
  CheckBox checkBox=CheckBox.create();
  if (nonNull(colorScheme)) {
    checkBox.setColor(colorScheme.color());
  }
  Style.of(checkBox).css("String_Node_Str");
  return checkBox;
}
Program: 62970
Project: 62970
Buggy source:
private void init(){
  this.timePicker.addTimeSelectionHandler(this::setStringValue);
  this.modalListener=evt -> modal.open();
  BodyObserver.observeRemoval(asElement(),mutationRecord -> {
    if (nonNull(popover))     popover.discard();
    if (nonNull(modal)) {
      modal.close();
      modal.asElement().remove();
    }
  }
);
  timePicker.addCloseHandler(() -> {
    if (nonNull(popover))     popover.close();
    if (nonNull(modal) && modal.isOpen())     modal.close();
  }
);
  timePicker.addClearHandler(() -> setValue(null));
  setPickerStyle(PickerStyle.MODAL);
  timePicker.setColorSchemeHandler((oldColorScheme,newColorScheme) -> {
    if (nonNull(modal)) {
      modal.getHeaderContainerElement().classList.remove(oldColorScheme.color().getStyle());
      modal.getHeaderContainerElement().classList.add(newColorScheme.color().getStyle());
    }
    if (nonNull(popover)) {
      popover.getHeadingElement().classList.remove(oldColorScheme.color().getStyle());
      popover.getHeadingElement().classList.add(newColorScheme.color().getStyle());
    }
  }
);
}

Fixed version (ground truth):
private void init(){
  this.timePicker.addTimeSelectionHandler(this::setStringValue);
  this.modalListener=evt -> modal.open();
  BodyObserver.observeRemoval(asElement(),mutationRecord -> {
    if (nonNull(popover))     popover.discard();
    if (nonNull(modal)) {
      modal.close();
      modal.asElement().remove();
    }
  }
);
  timePicker.addCloseHandler(() -> {
    if (nonNull(popover))     popover.close();
    if (nonNull(modal) && modal.isOpen())     modal.close();
  }
);
  timePicker.addClearHandler(() -> setValue(null));
  setPickerStyle(PickerStyle.MODAL);
}
Program: 62971
Project: 62971
Buggy source:
private void showInPopOver(){
  if (!PickerStyle.POPOVER.equals(this.pickerStyle)) {
    if (nonNull(modal)) {
      asElement().removeEventListener(EventType.click.getName(),modalListener);
      modal.close();
      modal.asElement().remove();
    }
    if (isNull(popover)) {
      popover=Popover.create(this.asElement(),getPlaceholder(),this.timePicker.asElement());
      popover.getContentElement().style.setProperty("String_Node_Str","String_Node_Str","String_Node_Str");
      popover.getContentElement().style.setProperty("String_Node_Str","String_Node_Str","String_Node_Str");
      popover.position(this.popupPosition).asElement().style.setProperty("String_Node_Str","String_Node_Str","String_Node_Str");
      popover.getHeadingElement().classList.add(Styles.align_center,timePicker.getColorScheme().color().getStyle());
    }
  }
  this.pickerStyle=PickerStyle.POPOVER;
}

Fixed version (ground truth):
private void showInPopOver(){
  if (!PickerStyle.POPOVER.equals(this.pickerStyle)) {
    if (nonNull(modal)) {
      asElement().removeEventListener(EventType.click.getName(),modalListener);
      modal.close();
      modal.asElement().remove();
    }
    if (isNull(popover)) {
      popover=Popover.createPicker(this.asElement(),this.timePicker.asElement());
      popover.getContentElement().style.setProperty("String_Node_Str","String_Node_Str","String_Node_Str");
      popover.getContentElement().style.setProperty("String_Node_Str","String_Node_Str","String_Node_Str");
      popover.position(this.popupPosition).asElement().style.setProperty("String_Node_Str","String_Node_Str","String_Node_Str");
    }
  }
  this.pickerStyle=PickerStyle.POPOVER;
}
Program: 62972
Project: 62972
Buggy source:
@Override public TimeBox setPlaceholder(String placeholder){
  getInputElement().placeholder=placeholder;
  if (nonNull(modal)) {
    modal.setTitle(placeholder);
    modal.getHeaderContainerElement().classList.add(timePicker.getColorScheme().color().getStyle());
  }
  if (nonNull(popover)) {
    popover.getHeaderText().textContent=placeholder;
    popover.getHeadingElement().classList.add(timePicker.getColorScheme().color().getStyle());
  }
  return this;
}

Fixed version (ground truth):
@Override public TimeBox setPlaceholder(String placeholder){
  getInputElement().placeholder=placeholder;
  return this;
}
Program: 62973
Project: 62973
Buggy source:
public TimePicker(DateTimeFormatInfo dateTimeFormatInfo){
  this.dateTimeFormatInfo=dateTimeFormatInfo;
  this.clock=createTime(dateTimeFormatInfo);
  createCenterCircles(colorScheme);
  initRootSvg();
  initPickerElements();
  clearHoverStyle();
  reDraw();
  initFooter();
  preventTextSelection();
}

Fixed version (ground truth):
public TimePicker(DateTimeFormatInfo dateTimeFormatInfo){
  this.dateTimeFormatInfo=dateTimeFormatInfo;
  this.clock=createTime(dateTimeFormatInfo);
  createCenterCircles(colorScheme);
  initRootSvg();
  initPickerElements();
  reDraw();
  initFooter();
  preventTextSelection();
}
Program: 62974
Project: 62974
Buggy source:
private ClockElement makeHourElement(int hour){
  ClockElement clockElement=ClockElement.createHour(hour,clockStyle,colorScheme);
  builderFor(clockElement.getElement()).on(EventType.mouseenter,event -> markElement(clockElement)).on(EventType.mousedown,event -> {
    event.stopPropagation();
    event.preventDefault();
    markElement(clockElement);
  }
).on(EventType.click,event -> {
    event.stopPropagation();
    selectHour(clockElement.getValue());
    if (autoSwitchMinutes) {
      showMinutes();
    }
  }
);
  return clockElement;
}

Fixed version (ground truth):
private ClockElement makeHourElement(int hour){
  ClockElement clockElement=ClockElement.createHour(hour,clockStyle,colorScheme);
  builderFor(clockElement.getElement()).on(EventType.mouseenter,event -> {
    drawHourPointer(hourElements.get(clock.getHour()));
    drawHourPointer(clockElement);
  }
).on(EventType.mousedown,event -> {
    event.stopPropagation();
    event.preventDefault();
    drawHourPointer(hourElements.get(clock.getHour()));
    drawHourPointer(clockElement);
  }
).on(EventType.mouseout,event -> {
    if (clock.getHour() != clockElement.getValue())     removeHourPointer(clockElement);
  }
).on(EventType.click,event -> {
    event.stopPropagation();
    selectHour(clockElement.getValue());
    if (autoSwitchMinutes) {
      showMinutes();
    }
  }
);
  return clockElement;
}
Program: 62975
Project: 62975
Buggy source:
private void animateClock(){
  Animation.create(getPickerContentContainer()).transition(Transition.ZOOM_IN).duration(600).animate();
}

Fixed version (ground truth):
private void animateClock(){
  Animation.create(getPickerContentContainer()).transition(Transition.PULSE).duration(600).animate();
}
Program: 62976
Project: 62976
Buggy source:
private ClockElement makeMinuteElement(int minute){
  ClockElement clockElement=ClockElement.createMinute(minute,colorScheme);
  builderFor(clockElement.getElement()).on(EventType.mouseenter,event -> {
    markElement(clockElement);
    drawMinutesPointer(clockElement);
    MouseEvent mouseEvent=Js.cast(event);
    if (mouseEvent.buttons == 1) {
      setminute(clockElement.getValue());
    }
  }
).on(EventType.mousedown,event -> {
    event.stopPropagation();
    event.preventDefault();
  }
).on(EventType.mouseup,event -> {
    event.stopPropagation();
    event.preventDefault();
    setminute(clockElement.getValue());
  }
).on(EventType.touchstart,event -> {
    event.stopPropagation();
    event.preventDefault();
  }
).on(EventType.touchmove,event -> {
    setminute(clockElement.getValue());
  }
);
  return clockElement;
}

Fixed version (ground truth):
private ClockElement makeMinuteElement(int minute){
  ClockElement clockElement=ClockElement.createMinute(minute,colorScheme);
  builderFor(clockElement.getElement()).on(EventType.mouseenter,event -> {
    drawMinutesPointer(minutesElements.get(clock.getMinute()));
    drawMinutesPointer(clockElement);
    MouseEvent mouseEvent=Js.cast(event);
    if (mouseEvent.buttons == 1) {
      setminute(clockElement.getValue());
    }
  }
).on(EventType.mouseout,event -> {
    if (clock.getMinute() != clockElement.getValue())     removeMinutesPointer(clockElement);
  }
).on(EventType.mousedown,event -> {
    event.stopPropagation();
    event.preventDefault();
  }
).on(EventType.mouseup,event -> {
    event.stopPropagation();
    event.preventDefault();
    setminute(clockElement.getValue());
  }
).on(EventType.touchstart,event -> {
    event.stopPropagation();
    event.preventDefault();
  }
).on(EventType.touchmove,event -> {
    setminute(clockElement.getValue());
  }
);
  return clockElement;
}