nus-yam/ex-repair huggingface dataset:
Program: 86389
Project: 86389
Buggy source:
/** 
 * If the module(s) called by this launcher require properties files, return their qualified path from here.Take note that the first added properties files will take precedence over subsequent ones if they contain conflicting keys. <p> Properties need to be in source folders, the path that we expect to get as a result of this call are of the form &lt;package>.&lt;properties file name without extension>. For example, if you have a file named "messages.properties" in package "org.eclipse.acceleo.sample", the path that needs be returned by a call to   {@link #getProperties()} is "org.eclipse.acceleo.sample.messages".</p>
 * @return The list of properties file we need to add to the generation context.
 * @see java.util.ResourceBundle#getBundle(String)
 * @generated NOT
 */
@Override public List<String> getProperties(){
  List<String> propertiesFiles=super.getProperties();
  propertiesFiles.add(EntityCommonPlugin.ORG_OBEONETWORK_DSL_ENTITY_GEN_JAVA_COMMON_DEFAULT_PROPERTIES);
  propertiesFiles.add(EntityCommonPlugin.ORG_OBEONETWORK_DSL_ENTITY_GEN_JAVA_COMMON_DEFAULT_JAVA_FILES_PROPERTIES);
  if (this.model != null && this.model.eResource() != null) {
    propertiesFiles.addAll(AcceleoPropertiesUtils.getPropertiesFilesNearModel(this.model.eResource()));
  }
  return propertiesFiles;
}

Fixed version (ground truth):
/** 
 * If the module(s) called by this launcher require properties files, return their qualified path from here.Take note that the first added properties files will take precedence over subsequent ones if they contain conflicting keys. <p> Properties need to be in source folders, the path that we expect to get as a result of this call are of the form &lt;package>.&lt;properties file name without extension>. For example, if you have a file named "messages.properties" in package "org.eclipse.acceleo.sample", the path that needs be returned by a call to   {@link #getProperties()} is "org.eclipse.acceleo.sample.messages".</p>
 * @return The list of properties file we need to add to the generation context.
 * @see java.util.ResourceBundle#getBundle(String)
 * @generated NOT
 */
@Override public List<String> getProperties(){
  List<String> propertiesFiles=super.getProperties();
  if (this.model != null && this.model.eResource() != null) {
    propertiesFiles.addAll(AcceleoPropertiesUtils.getPropertiesFilesNearModel(this.model.eResource()));
  }
  propertiesFiles.add(EntityCommonPlugin.ORG_OBEONETWORK_DSL_ENTITY_GEN_JAVA_COMMON_DEFAULT_PROPERTIES);
  propertiesFiles.add(EntityCommonPlugin.ORG_OBEONETWORK_DSL_ENTITY_GEN_JAVA_COMMON_DEFAULT_JAVA_FILES_PROPERTIES);
  return propertiesFiles;
}
Program: 86398
Project: 86398
Buggy source:
/** 
 * If the module(s) called by this launcher require properties files, return their qualified path from here.Take note that the first added properties files will take precedence over subsequent ones if they contain conflicting keys. <p> Properties need to be in source folders, the path that we expect to get as a result of this call are of the form &lt;package>.&lt;properties file name without extension>. For example, if you have a file named "messages.properties" in package "org.eclipse.acceleo.sample", the path that needs be returned by a call to   {@link #getProperties()} is "org.eclipse.acceleo.sample.messages".</p>
 * @return The list of properties file we need to add to the generation context.
 * @see java.util.ResourceBundle#getBundle(String)
 * @generated NOT
 */
@Override public List<String> getProperties(){
  propertiesFiles.add(AcceleoPropertiesUtils.PLATFORM_PLUGIN + EnvironmentCommonPlugin.PLUGIN_ID + EnvironmentCommonPlugin.ORG_OBEONETWORK_DSL_ENVIRONMENT_GEN_JAVA_COMMON_DEFAULT_PROPERTIES);
  propertiesFiles.add(AcceleoPropertiesUtils.PLATFORM_PLUGIN + EnvironmentCommonPlugin.PLUGIN_ID + EnvironmentCommonPlugin.ORG_OBEONETWORK_DSL_ENVIRONMENT_GEN_JAVA_COMMON_DEFAULT_TYPES);
  if (this.model != null && this.model.eResource() != null) {
    propertiesFiles.addAll(AcceleoPropertiesUtils.getPropertiesFilesNearModel(this.model.eResource()));
  }
  return propertiesFiles;
}

Fixed version (ground truth):
/** 
 * If the module(s) called by this launcher require properties files, return their qualified path from here.Take note that the first added properties files will take precedence over subsequent ones if they contain conflicting keys. <p> Properties need to be in source folders, the path that we expect to get as a result of this call are of the form &lt;package>.&lt;properties file name without extension>. For example, if you have a file named "messages.properties" in package "org.eclipse.acceleo.sample", the path that needs be returned by a call to   {@link #getProperties()} is "org.eclipse.acceleo.sample.messages".</p>
 * @return The list of properties file we need to add to the generation context.
 * @see java.util.ResourceBundle#getBundle(String)
 * @generated NOT
 */
@Override public List<String> getProperties(){
  if (this.model != null && this.model.eResource() != null) {
    propertiesFiles.addAll(AcceleoPropertiesUtils.getPropertiesFilesNearModel(this.model.eResource()));
  }
  propertiesFiles.add(AcceleoPropertiesUtils.PLATFORM_PLUGIN + EnvironmentCommonPlugin.PLUGIN_ID + EnvironmentCommonPlugin.ORG_OBEONETWORK_DSL_ENVIRONMENT_GEN_JAVA_COMMON_DEFAULT_PROPERTIES);
  propertiesFiles.add(AcceleoPropertiesUtils.PLATFORM_PLUGIN + EnvironmentCommonPlugin.PLUGIN_ID + EnvironmentCommonPlugin.ORG_OBEONETWORK_DSL_ENVIRONMENT_GEN_JAVA_COMMON_DEFAULT_TYPES);
  return propertiesFiles;
}
Program: 86399
Project: 86399
Buggy source:
@Override public List<String> getProperties(){
  String strutsPropertiesFile=AcceleoPropertiesUtils.PLATFORM_PLUGIN + CinematicArchitecturePlugin.PLUGIN_ID + CinematicArchitecturePlugin.STRUTS_PROPERTIES;
  propertiesFiles.add(strutsPropertiesFile);
  return propertiesFiles;
}

Fixed version (ground truth):
@Override public List<String> getProperties(){
  if (this.model != null && this.model.eResource() != null) {
    propertiesFiles.addAll(AcceleoPropertiesUtils.getPropertiesFilesNearModel(this.model.eResource()));
  }
  String strutsPropertiesFile=AcceleoPropertiesUtils.PLATFORM_PLUGIN + CinematicArchitecturePlugin.PLUGIN_ID + CinematicArchitecturePlugin.STRUTS_PROPERTIES;
  propertiesFiles.add(strutsPropertiesFile);
  return propertiesFiles;
}
Program: 86400
Project: 86400
Buggy source:
public boolean select(Object toTest){
  EObject eObj=EEFUtils.resolveSemanticObject(toTest);
  return (eObj != null && eObj instanceof Operator);
}

Fixed version (ground truth):
public boolean select(Object toTest){
  EObject eObj=EEFUtils.resolveSemanticObject(toTest);
  return (eObj != null && eObj instanceof Loop);
}
Program: 86401
Project: 86401
Buggy source:
protected void update(DAnalysis analysis,List<EObject> selectedEObjects){
  this.activeAnalysis=analysis;
  viewer.setInput(selectedEObjects);
}

Fixed version (ground truth):
protected void update(DAnalysis analysis,List<EObject> selectedEObjects){
  if (analysis != null) {
    this.activeAnalysis=analysis;
    viewer.setInput(selectedEObjects);
  }
 else {
    this.activeAnalysis=null;
    viewer.setInput(null);
  }
}
Program: 86402
Project: 86402
Buggy source:
public void activateOptions(){
  super.activateOptions();
  jedis=new Jedis(host,port);
  messages=new ConcurrentHashMap<String,String>();
  new Timer().schedule(new TimerTask(){
    public void run(){
      Entry<String,String> message;
      int i=0;
      int msz=messages.size();
      int sz=msz < msetmax ? msz : msetmax;
      byte[][] kv=new byte[sz * 2][];
      for (Iterator<Entry<String,String>> it=messages.entrySet().iterator(); it.hasNext(); ) {
        message=it.next();
        kv[i]=SafeEncoder.encode(message.getKey());
        kv[i + 1]=SafeEncoder.encode(message.getValue());
        i+=2;
        it.remove();
        if (i == sz * 2) {
          jedis.mset(kv);
          msz-=sz;
          if (msz > 0) {
            sz=msz < msetmax ? msz : msetmax;
            kv=new byte[sz * 2][];
            i=0;
          }
        }
      }
    }
  }
,1000,1000);
}

Fixed version (ground truth):
public void activateOptions(){
  super.activateOptions();
  jedis=new Jedis(host,port);
  messages=new ConcurrentHashMap<String,String>();
  new Timer().schedule(new TimerTask(){
    public void run(){
      Entry<String,String> message;
      int currentMessagesCount=messages.size();
      int bucketSize=currentMessagesCount < msetmax ? currentMessagesCount : msetmax;
      byte[][] bucket=new byte[bucketSize * 2][];
      int messageIndex=0;
      for (Iterator<Entry<String,String>> it=messages.entrySet().iterator(); it.hasNext(); ) {
        message=it.next();
        it.remove();
        bucket[messageIndex]=SafeEncoder.encode(message.getKey());
        bucket[messageIndex + 1]=SafeEncoder.encode(message.getValue());
        messageIndex+=2;
        if (messageIndex == bucketSize * 2) {
          jedis.mset(bucket);
          currentMessagesCount-=bucketSize;
          if (currentMessagesCount == 0) {
            break;
          }
 else {
            bucketSize=currentMessagesCount < msetmax ? currentMessagesCount : msetmax;
            bucket=new byte[bucketSize * 2][];
            messageIndex=0;
          }
        }
      }
    }
  }
,500,500);
}
Program: 86403
Project: 86403
Buggy source:
public void run(){
  Entry<String,String> message;
  int i=0;
  int msz=messages.size();
  int sz=msz < msetmax ? msz : msetmax;
  byte[][] kv=new byte[sz * 2][];
  for (Iterator<Entry<String,String>> it=messages.entrySet().iterator(); it.hasNext(); ) {
    message=it.next();
    kv[i]=SafeEncoder.encode(message.getKey());
    kv[i + 1]=SafeEncoder.encode(message.getValue());
    i+=2;
    it.remove();
    if (i == sz * 2) {
      jedis.mset(kv);
      msz-=sz;
      if (msz > 0) {
        sz=msz < msetmax ? msz : msetmax;
        kv=new byte[sz * 2][];
        i=0;
      }
    }
  }
}

Fixed version (ground truth):
public void run(){
  Entry<String,String> message;
  int currentMessagesCount=messages.size();
  int bucketSize=currentMessagesCount < msetmax ? currentMessagesCount : msetmax;
  byte[][] bucket=new byte[bucketSize * 2][];
  int messageIndex=0;
  for (Iterator<Entry<String,String>> it=messages.entrySet().iterator(); it.hasNext(); ) {
    message=it.next();
    it.remove();
    bucket[messageIndex]=SafeEncoder.encode(message.getKey());
    bucket[messageIndex + 1]=SafeEncoder.encode(message.getValue());
    messageIndex+=2;
    if (messageIndex == bucketSize * 2) {
      jedis.mset(bucket);
      currentMessagesCount-=bucketSize;
      if (currentMessagesCount == 0) {
        break;
      }
 else {
        bucketSize=currentMessagesCount < msetmax ? currentMessagesCount : msetmax;
        bucket=new byte[bucketSize * 2][];
        messageIndex=0;
      }
    }
  }
}
Program: 86404
Project: 86404
Buggy source:
public void run(){
  for (long i=0; i < 321; i++)   log.warn("String_Node_Str" + i);
}

Fixed version (ground truth):
public void run(){
  for (long i=0; i < 10000; i++)   log.warn("String_Node_Str" + i);
}
Program: 86405
Project: 86405
Buggy source:
public static void main(String[] args){
  for (int i=1; i <= 3; i++) {
    new Log4j2RedisTest.LogThread().start();
  }
  for (long i=0; i < 442; i++) {
    log.error("String_Node_Str" + i);
  }
}

Fixed version (ground truth):
public static void main(String[] args){
  for (int i=1; i <= 9; i++) {
    new Log4j2RedisTest.LogThread().start();
  }
  for (long i=0; i < 10000; i++) {
    log.error("String_Node_Str" + i);
  }
}
Program: 86406
Project: 86406
Buggy source:
@Override public View onCreateView(LayoutInflater inflater,ViewGroup container,Bundle savedInstanceState){
  View v=inflater.inflate(R.layout.siri_vehicle_mon_request,container,false);
  key=(EditText)v.findViewById(R.id.key);
  operatorRef=(EditText)v.findViewById(R.id.operatorRef);
  vehicleRef=(EditText)v.findViewById(R.id.vehicleRef);
  lineRef=(EditText)v.findViewById(R.id.lineRef);
  directionRef=(EditText)v.findViewById(R.id.directionRef);
  vehicleMonitoringDetailLevel=(EditText)v.findViewById(R.id.vehicleMonDetailLevel);
  maximumNumberOfCallsOnwards=(EditText)v.findViewById(R.id.maxNumOfCallsOnwards);
  final Button button=(Button)v.findViewById(R.id.submit);
  button.setOnClickListener(new View.OnClickListener(){
    public void onClick(    View v){
      new DownloadVehicleInfoTask().execute();
    }
  }
);
  return v;
}

Fixed version (ground truth):
@Override public View onCreateView(LayoutInflater inflater,ViewGroup container,Bundle savedInstanceState){
  View v=inflater.inflate(R.layout.siri_vehicle_mon_request,container,false);
  key=(EditText)v.findViewById(R.id.key);
  operatorRef=(EditText)v.findViewById(R.id.operatorRef);
  vehicleRef=(EditText)v.findViewById(R.id.vehicleRef);
  lineRef=(EditText)v.findViewById(R.id.lineRef);
  directionRef=(EditText)v.findViewById(R.id.directionRef);
  vehicleMonitoringDetailLevel=(EditText)v.findViewById(R.id.vehicleMonDetailLevel);
  maximumNumberOfCallsOnwards=(EditText)v.findViewById(R.id.maxNumOfCallsOnwards);
  final Button button=(Button)v.findViewById(R.id.submit);
  button.setOnClickListener(new View.OnClickListener(){
    public void onClick(    View v){
      new DownloadVehicleInfoTask().execute();
    }
  }
);
  key.setText(savedInstanceState.getString(keyVehKey));
  String strKey=SiriUtils.getKeyFromResource(getActivity());
  key.setText(strKey);
  return v;
}
Program: 86407
Project: 86407
Buggy source:
/** 
 * Internal method used to init main XmlMapper for XML parsing
 * @return initialized XmlMapper ready for XML parsing
 */
private static XmlMapper initXmlMapper(){
  if (xmlMapper == null) {
    XmlFactory f=new XmlFactory(new InputFactoryImpl(),new OutputFactoryImpl());
    JacksonXmlModule module=new JacksonXmlModule();
    module.setDefaultUseWrapper(false);
    XmlMapper xmlMapper=new XmlMapper(f,module);
    xmlMapper.configure(DeserializationFeature.ACCEPT_SINGLE_VALUE_AS_ARRAY,true);
    xmlMapper.configure(DeserializationFeature.ACCEPT_EMPTY_STRING_AS_NULL_OBJECT,true);
    xmlMapper.configure(DeserializationFeature.USE_JAVA_ARRAY_FOR_JSON_ARRAY,true);
    xmlMapper.configure(DeserializationFeature.READ_ENUMS_USING_TO_STRING,true);
    xmlMapper.setPropertyNamingStrategy(new PascalCaseStrategy());
  }
  return xmlMapper;
}

Fixed version (ground truth):
/** 
 * Internal method used to init main XmlMapper for XML parsing
 * @return initialized XmlMapper ready for XML parsing
 */
private static XmlMapper initXmlMapper(){
  if (xmlMapper == null) {
    XmlFactory f=new XmlFactory(new InputFactoryImpl(),new OutputFactoryImpl());
    JacksonXmlModule module=new JacksonXmlModule();
    module.setDefaultUseWrapper(false);
    xmlMapper=new XmlMapper(f,module);
    xmlMapper.configure(DeserializationFeature.ACCEPT_SINGLE_VALUE_AS_ARRAY,true);
    xmlMapper.configure(DeserializationFeature.ACCEPT_EMPTY_STRING_AS_NULL_OBJECT,true);
    xmlMapper.configure(DeserializationFeature.USE_JAVA_ARRAY_FOR_JSON_ARRAY,true);
    xmlMapper.configure(DeserializationFeature.READ_ENUMS_USING_TO_STRING,true);
    xmlMapper.setPropertyNamingStrategy(new PascalCaseStrategy());
  }
  return xmlMapper;
}
Program: 86410
Project: 86410
Buggy source:
public void onTabReselected(Tab tab,FragmentTransaction ft){
  Toast.makeText(mActivity,"String_Node_Str",Toast.LENGTH_SHORT).show();
}

Fixed version (ground truth):
public void onTabReselected(Tab tab,FragmentTransaction ft){
}
Program: 86411
Project: 86411
Buggy source:
public synchronized void run(){
  try {
    while (!isInterrupted()) {
      if (toRemove.isEmpty())       wait();
      if (minimalWait < 0) {
        long currentTime=System.currentTimeMillis();
        minimalWait=Long.MAX_VALUE;
        sleepUntil=0;
synchronized (toRemove) {
          for (Iterator<Map.Entry<K,ToRemove>> it=toRemove.entrySet().iterator(); it.hasNext(); ) {
            ToRemove tr=it.next().getValue();
            long timeleft=tr.timeLeft(currentTime);
            if (timeleft <= 0) {
              it.remove();
              remove(tr.key,false);
            }
 else             if (timeleft < minimalWait)             minimalWait=timeleft;
          }
        }
      }
      if (minimalWait != Long.MAX_VALUE) {
        long gowait=minimalWait;
        minimalWait=-1;
        sleepUntil=System.currentTimeMillis() + gowait;
        wait(gowait);
      }
    }
  }
 catch (  InterruptedException e) {
  }
}

Fixed version (ground truth):
public synchronized void run(){
  try {
    while (!isInterrupted()) {
      if (toRemove.isEmpty()) {
        minimalWait=-1;
        wait();
      }
      if (minimalWait < 0) {
        long currentTime=System.currentTimeMillis();
        minimalWait=Long.MAX_VALUE;
        sleepUntil=0;
synchronized (toRemove) {
          for (Iterator<Map.Entry<K,ToRemove>> it=toRemove.entrySet().iterator(); it.hasNext(); ) {
            ToRemove tr=it.next().getValue();
            long timeleft=tr.timeLeft(currentTime);
            if (timeleft <= 0) {
              it.remove();
              remove(tr.key,false);
            }
 else             if (timeleft < minimalWait)             minimalWait=timeleft;
          }
        }
      }
      if (minimalWait != Long.MAX_VALUE) {
        long gowait=minimalWait;
        minimalWait=-1;
        sleepUntil=System.currentTimeMillis() + gowait;
        wait(gowait);
      }
    }
  }
 catch (  InterruptedException e) {
  }
}
Program: 86412
Project: 86412
Buggy source:
@Override public void onLoadFinished(Loader<Cursor> loader,Cursor data){
  Log.d("String_Node_Str",String.valueOf(data.getCount()));
  if (data.getCount() != 0) {
    empty.setVisibility(View.GONE);
  }
 else {
    empty.setText(R.string.no_timelapses_found);
  }
  adapter.swapCursor(data);
}

Fixed version (ground truth):
@Override public void onLoadFinished(Loader<Cursor> loader,Cursor data){
  Log.d("String_Node_Str",String.valueOf(data.getCount()));
  empty.setVisibility(View.GONE);
  adapter.swapCursor(data);
}
Program: 86414
Project: 86414
Buggy source:
/** 
 * Called when the activity is first created. 
 */
@Override public void onCreate(Bundle savedInstanceState){
  super.onCreate(savedInstanceState);
  requestWindowFeature(Window.FEATURE_NO_TITLE);
  setContentView(R.layout.camera);
  c=(TimeLapseApplication)getApplicationContext();
  cameraOverlay=(ImageView)findViewById(id.camera_overlay);
  cameraOverlay.setAlpha(100);
  mCamera=getCameraInstance();
  picture_taken=false;
  if (mCamera == null) {
    showCameraErrorDialog();
  }
 else {
    setupCamera();
    mCameraPreview=new CameraPreview(this,mCamera);
    FrameLayout preview=(FrameLayout)findViewById(id.camera_preview);
    preview.addView(mCameraPreview);
    RelativeLayout container=(RelativeLayout)findViewById(id.container_layout);
    container.setOnTouchListener(shutterListener);
  }
}

Fixed version (ground truth):
/** 
 * Called when the activity is first created. 
 */
@Override public void onCreate(Bundle savedInstanceState){
  super.onCreate(savedInstanceState);
  requestWindowFeature(Window.FEATURE_NO_TITLE);
  setContentView(R.layout.camera);
  c=(TimeLapseApplication)getApplicationContext();
  cameraOverlay=(ImageView)findViewById(id.camera_overlay);
  cameraOverlay.setAlpha(100);
  mCamera=getCameraInstance();
  if (mCamera == null) {
    showCameraErrorDialog();
  }
 else {
    setupCamera();
    mCameraPreview=new CameraPreview(this,mCamera);
    FrameLayout preview=(FrameLayout)findViewById(id.camera_preview);
    preview.addView(mCameraPreview);
    RelativeLayout container=(RelativeLayout)findViewById(id.container_layout);
    container.setOnTouchListener(shutterListener);
  }
}
Program: 86415
Project: 86415
Buggy source:
@Override public boolean onTouch(View v,MotionEvent event){
  if ((event.getAction()) == event.ACTION_DOWN) {
    Log.d(TAG,"String_Node_Str");
    mCamera.takePicture(CameraUtils.mShutterFeedback,null,null,new CameraUtils.TimeLapsePictureCallback(timelapse_id));
    return true;
  }
  return false;
}

Fixed version (ground truth):
@Override public boolean onTouch(View v,MotionEvent event){
  if ((event.getAction()) == event.ACTION_DOWN) {
    Log.d(TAG,"String_Node_Str");
    if (!taking_picture) {
      taking_picture=true;
      mCamera.takePicture(CameraUtils.mShutterFeedback,null,null,new CameraUtils.TimeLapsePictureCallback(timelapse_id));
    }
    return true;
  }
  return false;
}
Program: 86416
Project: 86416
Buggy source:
@Override public void onPictureTaken(byte[] data,Camera camera){
  CameraActivity.picture_taken=true;
  new FileUtils.SavePictureOnFilesystem(timelapse_id).execute(data);
}

Fixed version (ground truth):
@Override public void onPictureTaken(byte[] data,Camera camera){
  new FileUtils.SavePictureOnFilesystem(timelapse_id).execute(data);
}
Program: 86417
Project: 86417
Buggy source:
@Override protected void onPostExecute(String result){
  super.onPostExecute(result);
  CameraActivity.setCameraOverlay(result);
}

Fixed version (ground truth):
@Override protected void onPostExecute(String result){
  super.onPostExecute(result);
  CameraActivity.setCameraOverlay(result);
  CameraActivity.taking_picture=false;
}
Program: 86418
Project: 86418
Buggy source:
protected void initialize(String basename){
  messages=new HashMap<String,Map<String,MessageFormat>>();
  Messages messages=messageProvider.getMessages(basename);
  for (  Locale locale : messages.getLocales()) {
    Map<String,String> codeToMessage=messages.getMessages(locale);
    for (    String code : codeToMessage.keySet()) {
      addMessage(basename,locale,code,createMessageFormat(codeToMessage.get(code),locale));
    }
  }
}

Fixed version (ground truth):
protected void initialize(String basename){
  Messages messagesForBasename=messageProvider.getMessages(basename);
  for (  Locale locale : messagesForBasename.getLocales()) {
    Map<String,String> codeToMessage=messagesForBasename.getMessages(locale);
    for (    String code : codeToMessage.keySet()) {
      addMessage(basename,locale,code,createMessageFormat(codeToMessage.get(code),locale));
    }
  }
}
Program: 86422
Project: 86422
Buggy source:
/** 
 * Will return the unification of all maplayers of all groups the user belongs to.
 * @return
 */
@Transient public Set<Module> getModules(){
  Set<Module> allModulesOfUser=new HashSet<Module>();
  Set<Group> groups=this.getGroups();
  if (groups != null) {
    for (    Group group : groups) {
      allModulesOfUser.addAll(group.getModules());
    }
  }
  return allModulesOfUser;
}

Fixed version (ground truth):
/** 
 * Will return the unification of all modules of all groups the user belongs to.
 * @return
 */
@Transient public Set<Module> getModules(){
  Set<Module> allModulesOfUser=new HashSet<Module>();
  Set<Group> groups=this.getGroups();
  if (groups != null) {
    for (    Group group : groups) {
      allModulesOfUser.addAll(group.getModules());
    }
  }
  return allModulesOfUser;
}
Program: 86423
Project: 86423
Buggy source:
private boolean validOpeningAndResponse(){
  Call responderCall=auction.getPartnersLastCall();
  if (responderCall != null && !responderCall.isPass()) {
    Call myOpeningBid=auction.getPartnersCall(responderCall);
    if (myOpeningBid != null && !myOpeningBid.isPass()) {
      return true;
    }
  }
  return false;
}

Fixed version (ground truth):
private boolean validOpeningAndResponse(){
  Call responderCall=auction.getPartnersLastCall();
  if (responderCall != null && responderCall.getBid().hasTrump()) {
    Call myOpeningBid=auction.getPartnersCall(responderCall);
    if (myOpeningBid != null && !myOpeningBid.isPass()) {
      return true;
    }
  }
  return false;
}
Program: 86424
Project: 86424
Buggy source:
@Override public void paint(Graphics g){
  g.drawImage(image,0,0,IMAGE_WIDTH,IMAGE_HEIGHT,null);
  if (played) {
    g.setColor(Color.GREEN);
  }
 else   if (selected) {
    g.setColor(Color.YELLOW);
  }
 else   if (high) {
    g.setColor(Color.BLUE);
  }
  if (selected || played || high) {
    g.drawRect(0,0,IMAGE_WIDTH - 1,IMAGE_HEIGHT - 1);
  }
}

Fixed version (ground truth):
@Override public void paint(Graphics g){
  g.drawImage(image,0,0,IMAGE_WIDTH,IMAGE_HEIGHT,null);
  if (played) {
    g.setColor(Color.GREEN);
  }
 else   if (selected) {
    g.setColor(Color.YELLOW);
  }
 else   if (high) {
    g.setColor(Color.BLUE);
  }
  if (selected || played || high) {
    g.draw3DRect(0,0,IMAGE_WIDTH - 1,IMAGE_HEIGHT - 1,true);
    g.drawRect(1,1,IMAGE_WIDTH - 3,IMAGE_HEIGHT - 3);
    g.drawRect(2,2,IMAGE_WIDTH - 5,IMAGE_HEIGHT - 5);
  }
}
Program: 86425
Project: 86425
Buggy source:
@Override protected Bid prepareBid(){
  return null;
}

Fixed version (ground truth):
@Override protected Bid prepareBid(){
  throw new RuntimeException("String_Node_Str");
}
Program: 86426
Project: 86426
Buggy source:
public static void setInstance(MockScoringTracker mock){
  instance=mock;
}

Fixed version (ground truth):
public static void setInstance(ScoringTracker mock){
  instance=mock;
}
Program: 86427
Project: 86427
Buggy source:
private boolean validOpeningAndResponse(){
  Call responderCall=auction.getPartnersLastCall();
  if (responderCall != null && responderCall.getBid().hasTrump()) {
    Call myOpeningBid=auction.getPartnersCall(responderCall);
    if (myOpeningBid != null && !myOpeningBid.isPass()) {
      return true;
    }
  }
  return false;
}

Fixed version (ground truth):
private boolean validOpeningAndResponse(){
  Call responderCall=auction.getPartnersLastCall();
  if (responderCall != null && responderCall.getBid().hasTrump()) {
    Call myOpeningBid=auction.getPartnersCall(responderCall);
    if (myOpeningBid != null && myOpeningBid.getBid().hasTrump() && auction.isOpening(myOpeningBid)) {
      return true;
    }
  }
  return false;
}
Program: 86428
Project: 86428
Buggy source:
public void testDoNotThrowNPEPartnerDidNotBid(){
  Auctioneer a=new Auctioneer(West.i());
  a.bid(new Pass());
  Rebid rule=new Rebid(a,new Hand("String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str")){
    @Override protected Bid prepareBid(){
      return null;
    }
  }
;
  assertEquals(null,rule.getBid());
}

Fixed version (ground truth):
public void testDoNotThrowNPEPartnerDidNotBid(){
  Auctioneer a=new Auctioneer(West.i());
  a.bid(PASS);
  Rebid rule=new Rebid(a,new Hand("String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str")){
    @Override protected Bid prepareBid(){
      return null;
    }
  }
;
  assertEquals(null,rule.getBid());
}
Program: 86429
Project: 86429
Buggy source:
public void testDoNotThrowNPEPartnerPass(){
  Auctioneer a=new Auctioneer(West.i());
  a.bid(new Pass());
  a.bid(new Pass());
  Rebid rule=new Rebid(a,new Hand("String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str")){
    @Override protected Bid prepareBid(){
      return null;
    }
  }
;
  assertEquals(null,rule.getBid());
}

Fixed version (ground truth):
public void testDoNotThrowNPEPartnerPass(){
  Auctioneer a=new Auctioneer(West.i());
  a.bid(PASS);
  a.bid(PASS);
  Rebid rule=new Rebid(a,new Hand("String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str")){
    @Override protected Bid prepareBid(){
      return null;
    }
  }
;
  assertEquals(null,rule.getBid());
}
Program: 86430
Project: 86430
Buggy source:
public void testPrepareBidInRebidSituation(){
  Auctioneer a=new Auctioneer(West.i());
  a.bid(new Bid(1,Clubs.i()));
  a.bid(new Pass());
  a.bid(new Bid(1,Diamonds.i()));
  a.bid(new Pass());
  Rebid rule=new Rebid(a,new Hand("String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str")){
    @Override protected Bid prepareBid(){
      return new Bid(7,NoTrump.i());
    }
  }
;
  assertEquals(new Bid(7,NoTrump.i()),rule.getBid());
}

Fixed version (ground truth):
public void testPrepareBidInRebidSituation(){
  Auctioneer a=new Auctioneer(West.i());
  a.bid(ONE_CLUBS);
  a.bid(PASS);
  a.bid(ONE_DIAMONDS);
  a.bid(PASS);
  Rebid rule=new Rebid(a,new Hand("String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str")){
    @Override protected Bid prepareBid(){
      return new Bid(7,NoTrump.i());
    }
  }
;
  assertEquals(new Bid(7,NoTrump.i()),rule.getBid());
}
Program: 86431
Project: 86431
Buggy source:
public void testOnlyApplyToRebids(){
  Auctioneer a=new Auctioneer(West.i());
  a.bid(new Bid(1,Hearts.i()));
  a.bid(new Pass());
  Rebid rule=new Rebid(a,new Hand("String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str")){
    @Override protected Bid prepareBid(){
      throw new RuntimeException("String_Node_Str");
    }
  }
;
  assertEquals(null,rule.getBid());
}

Fixed version (ground truth):
public void testOnlyApplyToRebids(){
  Auctioneer a=new Auctioneer(West.i());
  a.bid(ONE_HEARTS);
  a.bid(PASS);
  Rebid rule=new Rebid(a,new Hand("String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str")){
    @Override protected Bid prepareBid(){
      throw new RuntimeException("String_Node_Str");
    }
  }
;
  assertEquals(null,rule.getBid());
}
Program: 86432
Project: 86432
Buggy source:
public void testEquivaltenceVariousPruneStrategies(){
  for (int cardDeal=0; cardDeal < DEALS_TO_TRY; cardDeal++) {
    monkeys=new ArrayList<SearchMonkey>();
    Trump trump=determineTrump(cardDeal);
    g=new Game(trump);
    GameUtils.initializeRandom(g,CARDS_TO_DEAL);
    System.out.println("String_Node_Str" + cardDeal + "String_Node_Str");
    g.playOneTrick();
    g.printHands();
    g.printHandsDebug();
    System.out.println("String_Node_Str");
    for (    SearchConfiguration config : SearchConfiguration.values()) {
      SearchMonkey monkey=new SearchMonkey(config);
      monkeys.add(monkey);
      System.out.println("String_Node_Str" + config + "String_Node_Str");
      monkey.runSearch(g.duplicate());
      System.out.println("String_Node_Str");
    }
    System.out.println("String_Node_Str");
    assertAllSearchesFindSameNumberOfTricksTaken();
  }
}

Fixed version (ground truth):
public void testEquivaltenceVariousPruneStrategies(){
  for (int cardDeal=0; cardDeal < DEALS_TO_TRY; cardDeal++) {
    monkeys=new ArrayList<SearchMonkey>();
    Trump trump=determineTrump(cardDeal);
    g=new Game(trump);
    GameUtils.initializeRandom(g,CARDS_TO_DEAL);
    System.out.println("String_Node_Str" + cardDeal + "String_Node_Str");
    g.printHands();
    g.printHandsDebug();
    System.out.println("String_Node_Str");
    for (    SearchConfiguration config : SearchConfiguration.values()) {
      SearchMonkey monkey=new SearchMonkey(config);
      monkeys.add(monkey);
      System.out.println("String_Node_Str" + config + "String_Node_Str");
      monkey.runSearch(g.duplicate());
      System.out.println("String_Node_Str");
    }
    System.out.println("String_Node_Str");
    assertAllSearchesFindSameNumberOfTricksTaken();
  }
}
Program: 86433
Project: 86433
Buggy source:
public void runSearch(Game g){
  search=new DoubleDummySolver(g);
  search.setMaxTricks(SEARCH_DEPTH_CUTOFF);
  search.setTerminateIfRootOnlyHasOneValidMove(false);
  if (config == SearchConfiguration.MiniMax) {
    search.setUseDuplicateRemoval(false);
    search.setUsePruneLowestCardToLostTrick(false);
    search.useAlphaBetaPruning(false);
    search.setShouldPruneCardsInSequence(false);
    search.setShouldPruneCardsInPlayedSequence(false);
  }
  if (config == SearchConfiguration.NoDuplicatePruning) {
    search.setUseDuplicateRemoval(false);
  }
  if (config == SearchConfiguration.NoAlphaBetaPruning) {
    search.useAlphaBetaPruning(false);
  }
  if (config == SearchConfiguration.DuplicatePruning) {
    search.setUseDuplicateRemoval(true);
    search.setUsePruneLowestCardToLostTrick(false);
  }
  if (config == SearchConfiguration.DuplicateWithLowestPruning) {
    search.setUseDuplicateRemoval(true);
    search.setUsePruneLowestCardToLostTrick(true);
  }
  if (config == SearchConfiguration.NoSequencePruning) {
    search.setShouldPruneCardsInSequence(false);
  }
  if (config == SearchConfiguration.NoPlayedSequencePruning) {
    search.setShouldPruneCardsInPlayedSequence(false);
  }
  search.search();
  search.printStats();
  this.card=search.getRoot().getBestMove().getCardPlayed();
  this.northSouthTricks=search.getRoot().getTricksTaken(Player.NORTH_SOUTH);
}

Fixed version (ground truth):
public void runSearch(Game g){
  search=new DoubleDummySolver(g);
  search.setMaxTricks(SEARCH_DEPTH_CUTOFF);
  search.setTerminateIfRootOnlyHasOneValidMove(false);
  if (config == SearchConfiguration.DuplicatePruning) {
    search.setUseDuplicateRemoval(true);
    search.setUsePruneLowestCardToLostTrick(false);
  }
  if (config == SearchConfiguration.DuplicateWithLowestPruning) {
    search.setUseDuplicateRemoval(true);
    search.setUsePruneLowestCardToLostTrick(true);
  }
  search.search();
  search.printStats();
  this.card=search.getRoot().getBestMove().getCardPlayed();
  this.northSouthTricks=search.getRoot().getTricksTaken(Player.NORTH_SOUTH);
}
Program: 86434
Project: 86434
Buggy source:
void displayCurrentTrick(){
  message="String_Node_Str" + game.getTricksTaken(Player.NORTH_SOUTH) + "String_Node_Str"+ game.getTricksPlayed();
  table.displayTrick(game.getCurrentTrick(),panel);
  table.setDisplayingPreviousTrick(false);
  dummy.display();
  humanHandDisplay.display();
}

Fixed version (ground truth):
void displayCurrentTrick(){
  message="String_Node_Str" + game.getTricksTaken(Player.NORTH_SOUTH) + "String_Node_Str"+ game.getTricksPlayed();
  table.displayTrick(game.getCurrentTrick(),panel);
  table.setDisplayingPreviousTrick(false);
  displayDummyIfWestPlayed();
  humanHandDisplay.display();
}
Program: 86435
Project: 86435
Buggy source:
public void setGame(Game g,Direction human){
  game=g;
  table.setHumanDirection(human);
  humanHandDisplay=new AllCardsInOneRow(human,human,game,this);
  humanHandDisplay.display();
  dummy=new OneColumnPerColor(human,North.i(),game,this);
  dummy.display();
}

Fixed version (ground truth):
public void setGame(Game g,Direction human){
  game=g;
  table.setHumanDirection(human);
  humanHandDisplay=new AllCardsInOneRow(human,human,game,this);
  humanHandDisplay.display();
  dummy=new OneColumnPerColor(human,North.i(),game,this);
  displayDummyIfWestPlayed();
}
Program: 86436
Project: 86436
Buggy source:
public void pruneAsDuplicatePosition(){
  setPruned(true,Node.PRUNE_DUPLICATE_POSITION);
}

Fixed version (ground truth):
public void pruneAsDuplicatePosition(){
  setPruned(false,Node.PRUNE_DUPLICATE_POSITION);
}
Program: 86437
Project: 86437
Buggy source:
public boolean isPrunedDuplicatePosition(){
  return isPruned() && (getPruneType() == PRUNE_DUPLICATE_POSITION);
}

Fixed version (ground truth):
public boolean isPrunedDuplicatePosition(){
  return (pruneType == PRUNE_DUPLICATE_POSITION);
}
Program: 86438
Project: 86438
Buggy source:
private void removeDuplicatePositions(Node node){
  if (useDuplicateRemoval()) {
    Game position=game.duplicate();
    position.playMoves(node.getMoves());
    if (lookup.positionEncountered(position)) {
      node.pruneAsDuplicatePosition();
    }
  }
}

Fixed version (ground truth):
private void removeDuplicatePositions(Node node){
  if (useDuplicateRemoval()) {
    Game position=game.duplicate();
    position.playMoves(node.getMoves());
    if (lookup.positionEncountered(position)) {
      node.pruneAsDuplicatePosition();
      if (node.parent != null && (node.parent.isLastVisitedChild(node))) {
      }
    }
  }
}
Program: 86439
Project: 86439
Buggy source:
public void testAutomatedBidding(){
  GBController mainController=makeController();
  Auctioneer auction=mainController.getBiddingController().getAuction();
  System.out.println("String_Node_Str");
  mainController.getBiddingController().getCardHolder().printHands();
  System.out.println("String_Node_Str" + auction.getCalls());
  int initialBids=auction.getCalls().size();
  mainController.getBiddingController().placeBid(4,"String_Node_Str");
  System.out.println("String_Node_Str" + auction.getCalls());
  assertEquals("String_Node_Str",initialBids + 4,auction.getCalls().size());
}

Fixed version (ground truth):
public void testAutomatedBidding(){
  GBController mainController=makeController();
  Auctioneer auction=mainController.getBiddingController().getAuction();
  System.out.println("String_Node_Str");
  mainController.getBiddingController().getCardHolder().printHandsDebug();
  System.out.println("String_Node_Str" + auction.getCalls());
  int initialBids=auction.getCalls().size();
  mainController.getBiddingController().placeBid(4,"String_Node_Str");
  System.out.println("String_Node_Str" + auction.getCalls());
  assertEquals("String_Node_Str",initialBids + 4,auction.getCalls().size());
}
Program: 86440
Project: 86440
Buggy source:
public void printHandsDebug(){
  for (  Player player : players) {
    System.out.println("String_Node_Str" + player + "String_Node_Str"+ printHandDebug(player.getHand())+ "String_Node_Str");
  }
  System.out.println("String_Node_Str" + getNextToPlay().toString().toUpperCase() + "String_Node_Str");
  System.out.println("String_Node_Str" + getTrump().toDebugString() + "String_Node_Str");
}

Fixed version (ground truth):
public void printHandsDebug(){
  for (  Player player : players) {
    System.out.println("String_Node_Str" + player + "String_Node_Str"+ printHandDebug(player.getHand())+ "String_Node_Str");
  }
  System.out.println("String_Node_Str" + getNextToPlay().toString().toUpperCase() + "String_Node_Str");
  if (getTrump() != null) {
    System.out.println("String_Node_Str" + getTrump().toDebugString() + "String_Node_Str");
  }
}
Program: 86441
Project: 86441
Buggy source:
private boolean partnerWasRespondingToMy1NT(){
  if (auction.getPartnersLastCall() == null || auction.getPartnersCall(auction.getPartnersLastCall()) == null) {
    return false;
  }
  Call partnersCall=auction.getPartnersLastCall();
  return new Bid(1,NoTrump.i()).equals(auction.getPartnersCall(partnersCall).getBid());
}

Fixed version (ground truth):
private boolean partnerWasRespondingToMy1NT(){
  if (auction.getPartnersLastCall() == null || auction.getPartnersCall(auction.getPartnersLastCall()) == null) {
    return false;
  }
  Call partnersCall=auction.getPartnersLastCall();
  if (new Pass().equals(partnersCall.getBid())) {
    return false;
  }
  return new Bid(1,NoTrump.i()).equals(auction.getPartnersCall(partnersCall).getBid());
}
Program: 86442
Project: 86442
Buggy source:
@Override public void paint(Graphics g){
  Image image=new ImageIcon("String_Node_Str" + card.toString().replaceAll("String_Node_Str","String_Node_Str") + "String_Node_Str").getImage();
  g.drawImage(image,0,0,IMAGE_WIDTH,IMAGE_HEIGHT,null);
}

Fixed version (ground truth):
@Override public void paint(Graphics g){
  Image image=new ImageIcon("String_Node_Str" + card.toString().replaceAll("String_Node_Str","String_Node_Str") + "String_Node_Str").getImage();
  g.drawImage(image,0,0,IMAGE_WIDTH,IMAGE_HEIGHT,null);
  if (selected) {
    g.setColor(Color.YELLOW);
    g.drawRect(0,0,IMAGE_WIDTH - 1,IMAGE_HEIGHT - 1);
  }
}
Program: 86443
Project: 86443
Buggy source:
private Game makeGame(Auctioneer a,Game cardHolder){
  Game result=new Game(a.getHighBid().getTrump());
  result.getNorth().init(cardHolder.getPlayer(a.getDummyOffsetDirection(North.i())).getHand());
  result.getEast().init(cardHolder.getPlayer(a.getDummyOffsetDirection(East.i())).getHand());
  result.getSouth().init(cardHolder.getPlayer(a.getDummyOffsetDirection(South.i())).getHand());
  result.getWest().init(cardHolder.getPlayer(a.getDummyOffsetDirection(West.i())).getHand());
  result.setNextToPlay(West.i().getValue());
  return result;
}

Fixed version (ground truth):
private Game makeGame(Auctioneer a,Game cardHolder){
  Game result=new Game(a.getHighBid().getTrump());
  result.getPlayer(a.getDummyOffsetDirection(North.i())).init(cardHolder.getPlayer(North.i()).getHand());
  result.getPlayer(a.getDummyOffsetDirection(East.i())).init(cardHolder.getPlayer(East.i()).getHand());
  result.getPlayer(a.getDummyOffsetDirection(South.i())).init(cardHolder.getPlayer(South.i()).getHand());
  result.getPlayer(a.getDummyOffsetDirection(West.i())).init(cardHolder.getPlayer(West.i()).getHand());
  result.setNextToPlay(West.i().getValue());
  return result;
}
Program: 86444
Project: 86444
Buggy source:
public void placeBid(int bidSize,String trump){
  if (!auction.biddingFinished()) {
    if (!auction.getNextToBid().equals(human.getDirection2())) {
      view.getBiddingDisplay().display("String_Node_Str");
      return;
    }
    Bid candidate=Bid.makeBid(bidSize,trump);
    if (!auction.isValid(candidate)) {
      view.getBiddingDisplay().display("String_Node_Str");
      return;
    }
    auction.bid(candidate);
    view.getBiddingDisplay().display("String_Node_Str" + candidate);
    doAutomatedBidding();
  }
  if (auction.biddingFinished()) {
    view.getBiddingDisplay().display("String_Node_Str" + auction.getHighBid());
  }
}

Fixed version (ground truth):
public void placeBid(int bidSize,String trump){
  if (!auction.biddingFinished()) {
    if (!auction.getNextToBid().equals(human.getDirection2())) {
      view.getBiddingDisplay().display("String_Node_Str");
      return;
    }
    Bid candidate=Bid.makeBid(bidSize,trump);
    if (!auction.isValid(candidate)) {
      view.getBiddingDisplay().display("String_Node_Str");
      return;
    }
    auction.bid(candidate);
    view.getBiddingDisplay().display("String_Node_Str" + candidate);
    view.auctionStateChanged();
    doAutomatedBidding();
  }
  if (auction.biddingFinished()) {
    view.getBiddingDisplay().display("String_Node_Str" + auction.getHighBid());
  }
}
Program: 86445
Project: 86445
Buggy source:
public void setGame(Game game,Direction human){
  biddingPane=theWindow.getContentPane();
  biddingPane.setVisible(false);
  playPane=new JPanel();
  playPane.setPreferredSize(new Dimension(800,600));
  theWindow.setContentPane(playPane);
  PlayControls playControls=new PlayControls(this);
  playControls.placeOn(theWindow);
  playControls.setGame(game,human);
  theWindow.pack();
}

Fixed version (ground truth):
public void setGame(Game game,Direction human){
  biddingPane=theWindow.getContentPane();
  biddingPane.setVisible(false);
  playPane=new JPanel();
  playPane.setPreferredSize(new Dimension(800,750));
  theWindow.setContentPane(playPane);
  PlayControls playControls=new PlayControls(this);
  playControls.placeOn(theWindow);
  playControls.setGame(game,human);
  theWindow.pack();
}
Program: 86446
Project: 86446
Buggy source:
public void mouseExited(MouseEvent arg0){
}

Fixed version (ground truth):
public void mouseExited(MouseEvent arg0){
  theCard.setSelected(false);
}
Program: 86447
Project: 86447
Buggy source:
public void paintComponent(Graphics g){
  super.paintComponent(g);
  g.drawString("String_Node_Str" + game.getTrump(),20,DHEIGHT - 25);
}

Fixed version (ground truth):
public void paintComponent(Graphics g){
  super.paintComponent(g);
  g.drawRect((int)table.getX(),(int)table.getY(),(int)table.getWidth(),(int)table.getHeight());
  g.drawString("String_Node_Str" + game.getTrump(),20,DHEIGHT - 25);
}
Program: 86448
Project: 86448
Buggy source:
public PlayControls(MainWindow owner){
  super(owner);
  panel.setLayout(null);
  panel.setPreferredSize(new Dimension(WIDTH,DHEIGHT));
}

Fixed version (ground truth):
public PlayControls(MainWindow owner){
  super(owner);
  panel.setLayout(null);
  panel.setPreferredSize(new Dimension(WIDTH,DHEIGHT));
  table=new Rectangle(290,DHEIGHT - CardPanel.IMAGE_HEIGHT - 35- 5- 275,222,275);
}
Program: 86449
Project: 86449
Buggy source:
private Point determineDummyPos(Direction human,int longestColorLength){
  if (South.i().equals(human)) {
    return new Point(175,10);
  }
 else   if (West.i().equals(human)) {
    return new Point(30,150);
  }
 else   if (East.i().equals(human)) {
    return new Point(600,150);
  }
  throw new RuntimeException("String_Node_Str");
}

Fixed version (ground truth):
private Point determineDummyPos(Direction human,int longestColorLength){
  if (South.i().equals(human)) {
    return new Point(235,5);
  }
 else   if (West.i().equals(human)) {
    return new Point(10,DHEIGHT - 500);
  }
 else   if (East.i().equals(human)) {
    return new Point(512,DHEIGHT - 500);
  }
  throw new RuntimeException("String_Node_Str");
}
Program: 86450
Project: 86450
Buggy source:
public void mouseEntered(MouseEvent arg0){
}

Fixed version (ground truth):
public void mouseEntered(MouseEvent arg0){
  if (theGame.isLegalMove(theCard.getCard())) {
    theCard.setSelected(true);
  }
}
Program: 86451
Project: 86451
Buggy source:
public DaListener(CardPanel card){
  theCard=card;
}

Fixed version (ground truth):
public DaListener(CardPanel card,Game g){
  theCard=card;
  theGame=g;
}
Program: 86452
Project: 86452
Buggy source:
@Override protected JPanel createDisplayPanel(){
  return new JPanel(){
    public void paintComponent(    Graphics g){
      super.paintComponent(g);
      g.drawString("String_Node_Str" + game.getTrump(),20,DHEIGHT - 25);
    }
  }
;
}

Fixed version (ground truth):
@Override protected JPanel createDisplayPanel(){
  return new JPanel(){
    public void paintComponent(    Graphics g){
      super.paintComponent(g);
      g.drawRect((int)table.getX(),(int)table.getY(),(int)table.getWidth(),(int)table.getHeight());
      g.drawString("String_Node_Str" + game.getTrump(),20,DHEIGHT - 25);
    }
  }
;
}
Program: 86453
Project: 86453
Buggy source:
public void setGame(Game g,Direction human){
  game=g;
  int i=0;
  Hand humanHand=new Hand(game.getPlayer(human).getHand());
  for (  Card card : humanHand.getCardsHighToLow()) {
    CardPanel cardPanel=new CardPanel(card);
    cardPanel.addMouseListener(new DaListener(cardPanel));
    cardPanel.addMouseMotionListener(new DaListener(cardPanel));
    panel.add(cardPanel);
    System.out.println("String_Node_Str" + panel.getHeight());
    cardPanel.setLocation(75 + CARD_OFFSET * i,DHEIGHT - CardPanel.IMAGE_HEIGHT - 35);
    panel.setComponentZOrder(cardPanel,0);
    i++;
  }
  Hand dummyHand=new Hand(game.getPlayer(North.i()).getHand());
  Point dummyUpperLeft=determineDummyPos(human,dummyHand.getLongestColorLength());
  for (  Color color : Color.list) {
    int j=0;
    for (    Card card : dummyHand.getColorHi2Low(color)) {
      CardPanel cardPanel=new CardPanel(card);
      if (human.equals(South.i())) {
        cardPanel.addMouseListener(new DaListener(cardPanel));
        cardPanel.addMouseMotionListener(new DaListener(cardPanel));
      }
      panel.add(cardPanel);
      cardPanel.setLocation((int)dummyUpperLeft.getX(),(int)dummyUpperLeft.getY() + CARD_OFFSET * j);
      panel.setComponentZOrder(cardPanel,0);
      j++;
    }
    dummyUpperLeft.setLocation(dummyUpperLeft.getX() + CardPanel.IMAGE_WIDTH + 5,dummyUpperLeft.getY());
  }
  panel.repaint();
}

Fixed version (ground truth):
public void setGame(Game g,Direction human){
  game=g;
  int i=0;
  Hand humanHand=new Hand(game.getPlayer(human).getHand());
  for (  Card card : humanHand.getCardsHighToLow()) {
    CardPanel cardPanel=new CardPanel(card);
    DaListener listener=new DaListener(cardPanel,game);
    cardPanel.addMouseListener(listener);
    cardPanel.addMouseMotionListener(listener);
    panel.add(cardPanel);
    cardPanel.setLocation(200 + CARD_OFFSET * i,DHEIGHT - CardPanel.IMAGE_HEIGHT - 35);
    panel.setComponentZOrder(cardPanel,0);
    i++;
  }
  Hand dummyHand=new Hand(game.getPlayer(North.i()).getHand());
  Point dummyUpperLeft=determineDummyPos(human,dummyHand.getLongestColorLength());
  for (  Color color : Color.list) {
    int j=0;
    for (    Card card : dummyHand.getColorHi2Low(color)) {
      CardPanel cardPanel=new CardPanel(card);
      if (human.equals(South.i())) {
        DaListener listener=new DaListener(cardPanel,game);
        cardPanel.addMouseListener(listener);
        cardPanel.addMouseMotionListener(listener);
      }
      panel.add(cardPanel);
      cardPanel.setLocation((int)dummyUpperLeft.getX(),(int)dummyUpperLeft.getY() + CARD_OFFSET * j);
      panel.setComponentZOrder(cardPanel,0);
      j++;
    }
    dummyUpperLeft.setLocation(dummyUpperLeft.getX() + CardPanel.IMAGE_WIDTH + 2,dummyUpperLeft.getY());
  }
  panel.repaint();
}